Create your own custom HTML tags/component...TODAY (github.com)
Q: What if we could easily extend HTML with tags that do more than just tell Google's crawler about the layout of our content?
A: We can, right now, today, on a hell-of-a-lot-of existing browsers and devices: https://github.com/csuwldcat/WebComponents
2 comments
[ 4.5 ms ] story [ 22.1 ms ] threadKind of like a DIY shadow DOM: http://glazkov.com/2011/01/14/what-the-heck-is-shadow-dom/
The parse does not turn the custom tags into divs, there is no need to do that. These are fully capable, valid tags and exist in the source just the way you write them: <moz:sometag></moz:sometag>. Check out the demo linked to in the repo and you'll see ;)
Also, the way the code works is even a bit better than you described in the dynamic creation case. Let's take your example:
you would actually receive a _fully inflated_ element that is already event-bound when it is returned out of document.createElement, pretty sweet right? The innerHTML value of slider would literally read: