|
|
|
|
|
by jarek-foksa
5236 days ago
|
|
The idea that CSS selectors could be used for element creation is awesome. It would be so convenient to write: var link = el("a#top.link[src='http://google.com'][data-external='true']")
Instead of: var link = document.createElement('a');
link.setAttribute('id', 'top');
link.setAttribute('class', 'link');
link.setAttribute('src', 'http://google.com');
link.dataset.external = 'true'
Someone needs to bring it to W3C forums, otherwise we might end up with this http://lists.w3.org/Archives/Public/www-dom/2011OctDec/0020.... |
|
I guess you have the overhead of the template language and rendering them though still.
[1] http://haml-lang.com/
[2] http://jade-lang.com/
EDIT: Added links.