Fixed typos

pull/171/head
Andrew Murray 9 years ago
parent be83096bac
commit 1b48d39e56

@ -46,7 +46,7 @@ performance, small size and all the features listed below.
to hook into any part of the diff and patch process.
* Splendid performance. Snabbdom is among the fastest virtual DOM libraries
in the [Virtual DOM Benchmark](http://vdom-benchmark.github.io/vdom-benchmark/).
* Patch function with a function signature equivelant to a reduce/scan
* Patch function with a function signature equivalent to a reduce/scan
function. Allows for easier integration with a FRP library.
* Features in modules
* `h` function for easily creating virtual DOM nodes.
@ -64,7 +64,7 @@ performance, small size and all the features listed below.
```javascript
var snabbdom = require('snabbdom');
var patch = snabbdom.init([ // Init patch function with choosen modules
var patch = snabbdom.init([ // Init patch function with chosen modules
require('snabbdom/modules/class'), // makes it easy to toggle classes
require('snabbdom/modules/props'), // for setting properties on DOM elements
require('snabbdom/modules/style'), // handles styling on elements with support for animations
@ -121,7 +121,7 @@ is a vnode representing the new, updated view.
If a DOM element with a parent is passed, `newVnode` will be turned
into a DOM node, and the passed element will be replaced by the
created DOM node. If an old vnode is passed, Snabbdom will effeciently
created DOM node. If an old vnode is passed, Snabbdom will efficiently
modify it to match the description in the new vnode.
Any old vnode passed must be the resulting vnode from a previous call
@ -259,7 +259,7 @@ var myModule = {
};
```
With this mechanism you can easily augument the behaviour of Snabbdom.
With this mechanism you can easily augment the behaviour of Snabbdom.
For demonstration, take a look at the implementations of the default
modules.
@ -452,7 +452,7 @@ h('div', [
### SVG
SVG just works when using the `h` function for creating virtual
nodes. SVG elements are automatially created with the appropriate
nodes. SVG elements are automatically created with the appropriate
namespaces.
```javascript
@ -487,7 +487,7 @@ h('text', {
The `thunk` function takes a selector, a key for identifying a thunk,
a function that returns a vnode and a variable amount of state
parameters. If invoked, the render function will recieve the state
parameters. If invoked, the render function will receive the state
arguments.
`thunk(selector, key, renderFn, [stateArguments])`

@ -75,7 +75,7 @@ describe('attachTo', function() {
elm = patch(vnode1, vnode2).elm;
assert.equal(elm.children.length, 1);
});
it('remove hook recieves real element', function() {
it('remove hook receives real element', function() {
function rm(vnode, cb) {
assert.equal(vnode.elm.tagName, 'DIV');
assert.equal(vnode.elm.innerHTML, 'First text');

@ -89,13 +89,13 @@ describe('snabbdom', function() {
assert.equal(elm.firstChild.namespaceURI, SVGNamespace);
assert.equal(elm.firstChild.firstChild.namespaceURI, XHTMLNamespace);
});
it('is recieves classes in selector', function() {
it('is receives classes in selector', function() {
elm = patch(vnode0, h('div', [h('i.am.a.class')])).elm;
assert(elm.firstChild.classList.contains('am'));
assert(elm.firstChild.classList.contains('a'));
assert(elm.firstChild.classList.contains('class'));
});
it('is recieves classes in class property', function() {
it('is receives classes in class property', function() {
elm = patch(vnode0, h('i', {class: {am: true, a: true, class: true, not: false}})).elm;
assert(elm.classList.contains('am'));
assert(elm.classList.contains('a'));

Loading…
Cancel
Save