Created
February 17, 2017 18:05
-
-
Save barneycarroll/0d8de4c998be2f7b56ac130899bfef2f to your computer and use it in GitHub Desktop.
Mithril v/dom alignment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function * vTreeWalker(vnode){ | |
yield vnode | |
if(vnode.instance) | |
yield * vTreeWalker(vnode.instance) | |
else if(Array.isArray(vnode.children)) | |
for(const child in vnode.children) | |
yield * vTreeWalker(child) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO:
dom.vnode
form.render
integration (consider fragments - is it possible?)API: