-
-
Save Raynos/477c8b821ea450c713c7 to your computer and use it in GitHub Desktop.
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
/* | |
append is widget aware and knows how to either append DOMElement's to a container | |
or append a widget to a container | |
`var widget = append(container, MyWidget(...))` | |
*/ | |
function append(container, widget) { | |
var elem = widget.view ? widget.view : widget | |
container.appendChild(elem) | |
return widget | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment