pull/118/head
paldepind 9 years ago
commit f04de4acf9

@ -160,7 +160,7 @@ desired points in the life of a virtual node.
| Name | Triggered when | Arguments to callback |
| ----------- | -------------- | ----------------------- |
| `pre` | the patch process begins | none |
| `init` | a vnode has been added | vnode |
| `init` | a vnode has been added | `vnode` |
| `create` | a DOM element has been created based on a vnode | `emptyVnode, vnode` |
| `insert` | an element has been inserted into the DOM | `vnode` |
| `prepatch` | an element is about to be patched | `oldVnode, vnode` |

@ -70,7 +70,7 @@ function init(modules, api) {
elm = vnode.elm = isDef(data) && isDef(i = data.ns) ? api.createElementNS(i, tag)
: api.createElement(tag);
if (hash < dot) elm.id = sel.slice(hash + 1, dot);
if (dotIdx > 0) elm.className = sel.slice(dot+1).replace(/\./g, ' ');
if (dotIdx > 0) elm.className = sel.slice(dot + 1).replace(/\./g, ' ');
if (is.array(children)) {
for (i = 0; i < children.length; ++i) {
api.appendChild(elm, createElm(children[i], insertedVnodeQueue));

Loading…
Cancel
Save