Created
December 25, 2011 01:56
-
-
Save nateps/1518620 to your computer and use it in GitHub Desktop.
Revisions
-
nateps created this gist
Dec 25, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ <!DOCTYPE html> <title></title> <div id=status></div> <div id=container style=display:none></div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> var src = window.location.hash.substr(1), script = document.createElement('script'); script.src = src; script.addEventListener('load', function() { $('#status').html('<p>Running test for ' + src + '</p>'); setTimeout(runTest, 0); }); document.body.appendChild(script); function runTest() { var start = +new Date(), i = 100, j, morph; while (i--) { morph = Metamorph("one two three"); $('#container').html(morph.outerHTML()); j = 100; while (j--) { morph.html("three four five six"); } } $('#status').append('<p>Completed in ' + (new Date() - start) + '</p>'); } </script>