"Vanilla JS is a fast, lightweight, cross-platform framework
for building incredible, powerful JavaScript applications."
Retrieve DOM element by ID
Code | ops / sec | |
---|---|---|
Vanilla JS | document.getElementById('test-table'); |
12,137,211
|
Dojo | dojo.byId('test-table'); |
5,443,343
|
Prototype JS | $('test-table') |
2,940,734
|
Ext JS | delete Ext.elCache['test-table']; Ext.get('test-table'); |
997,562
|
jQuery | $jq('#test-table'); |
350,557
|
Retrieve DOM elements by tag name
Code | ops / sec | |
---|---|---|
Vanilla JS | document.getElementsByTagName("span"); |
8,280,893
|
Prototype JS | Prototype.Selector.select('span', document); |
62,872
|
YUI | YAHOO.util.Dom.getElementsBy(function(){return true;},'span'); |
48,545
|
Ext JS | Ext.query('span'); |
46,915
|
jQuery | $jq('span'); |
19,449
|