This is actually pretty useful. Basically, it lets you do something like this:
document.createElement('slider')
Or just write it in HTML like this: <slider></slider>
And as soon as the page is about to render it, the script intercepts it and turns it into something like this (with styles, events, etc): <div class="slider"><div class="slider-knob">O</div></div>
You could write a jQuery plugin that does this, however you'd have to initialize it every time you added the element into the page.Kind of like a DIY shadow DOM: http://glazkov.com/2011/01/14/what-the-heck-is-shadow-dom/