Monday, April 11, 2016

web "tool": Vanilla JS

Vanilla JS
"Vanilla JS is a fast, lightweight, cross-platform framework
for building incredible, powerful JavaScript applications."

Retrieve DOM element by ID

Codeops / sec
Vanilla JSdocument.getElementById('test-table');
12,137,211
 
Dojodojo.byId('test-table');
5,443,343
 
Prototype JS$('test-table')
2,940,734
 
Ext JSdelete Ext.elCache['test-table']; Ext.get('test-table');
997,562
 
jQuery$jq('#test-table');
350,557

Retrieve DOM elements by tag name

Codeops / sec
Vanilla JSdocument.getElementsByTagName("span");
8,280,893
 
Prototype JSPrototype.Selector.select('span', document);
62,872
 
YUIYAHOO.util.Dom.getElementsBy(function(){return true;},'span');
48,545
 
Ext JSExt.query('span');
46,915
 
jQuery$jq('span');
19,449

"VanillaJS is regular Javascript. That's the joke."



No comments: