Editing jQuery vs dojo vs mootools - Dom This edit will create a new revision. Your details (optional) Name Email (won’t be displayed; might be used for Gravatar) URL Test case details Title * Published (uncheck if you want to fiddle around before making the page public) Description (in case you feel further explanation is needed)(Markdown syntax is allowed) Are you a spammer? (just answer the question) Preparation code Preparation code HTML (this will be inserted in the <body> of a valid HTML5 document in standards mode) (useful when testing DOM operations or including libraries) <script src="//ajax.googleapis.com/ajax/libs/ext-core/3/ext-core.js"></script> <script src="//ajax.googleapis.com/ajax/libs/dojo/1.8.1/dojo/dojo.js"></script> <script src="//ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script> require(['dojo/query!css3', 'dojo/dom'], function(query, dom) { dQuery = query; dDom = dom; }); mQuery = $$; </script> <div id="container"> <div class="content"> <p></p> </div> </div> Include JavaScript libraries as follows: <script src="//cdn.ext/library.js"></script> Define setup for all tests (variables, functions, arrays or other objects that will be used in the tests) (runs before each clocked test loop, outside of the timed code region) (e.g. define local test variables, reset global variables, clear canvas, etc.) (see FAQ) Define teardown for all tests (runs after each clocked test loop, outside of the timed code region) (see FAQ) Code snippets to compare Test 1 Title Async (check if this is an asynchronous test) Code var d1 = dQuery(".content"); Test 2 Title Async (check if this is an asynchronous test) Code var j1 = jQuery('.content'); Test 3 Title Async (check if this is an asynchronous test) Code var m1 = mQuery('.content'); Test 4 Title Async (check if this is an asynchronous test) Code var j2 = jQuery('.content p'); Test 5 Title Async (check if this is an asynchronous test) Code var m2 = mQuery('.content p'); Test 6 Title Async (check if this is an asynchronous test) Code var d2 = dQuery(".content p"); Test 7 Title Async (check if this is an asynchronous test) Code var j3 = jQuery('.content').find('p'); Test 8 Title Async (check if this is an asynchronous test) Code var d4 = dQuery("#container"); Test 9 Title Async (check if this is an asynchronous test) Code var j4 = jQuery("#container"); Test 10 Title Async (check if this is an asynchronous test) Code var m4 = document.id("container"); Test 11 Title Async (check if this is an asynchronous test) Code var d5 = dQuery("p", "container"); Test 12 Title Async (check if this is an asynchronous test) Code var j5 = jQuery("p", "#container"); Test 13 Title Async (check if this is an asynchronous test) Code var m5 = document.id("container").getElement("p"); Test 14 Title Async (check if this is an asynchronous test) Code var n1 = document.getElementById('container') Test 15 Title Async (check if this is an asynchronous test) Code var n2 = document.getElementsByClassName('content') Test 16 Title Async (check if this is an asynchronous test) Code var n3 = document.getElementById('container').getElementsByTagName('p') Test 17 Title Async (check if this is an asynchronous test) Code var dd1 = dDom.byId('container') Test 18 Title Async (check if this is an asynchronous test) Code var ext1 = Ext.query('container')