diff options
Diffstat (limited to 'npm_assets/node_modules/html5shiv/test/perf.1.html')
| -rw-r--r-- | npm_assets/node_modules/html5shiv/test/perf.1.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/npm_assets/node_modules/html5shiv/test/perf.1.html b/npm_assets/node_modules/html5shiv/test/perf.1.html new file mode 100644 index 0000000..62890ef --- /dev/null +++ b/npm_assets/node_modules/html5shiv/test/perf.1.html @@ -0,0 +1,41 @@ +<!doctype html> +<html> + <head> + <meta charset="utf-8"> + <title>HTML5 Shiv</title> + <link rel="stylesheet" href="style.css"> + <script src="../src/html5shiv-printshiv.js"></script> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js"></script> + </head> + <body> + <div id="time"></div> + <section>This sentence is in a green box <mark>with these words highlighted</mark>.</section> + <script> + function addDom(){ + var div, frag, fragDiv, divFrag, divFragDiv; + div = document.createElement('div'); + div.innerHTML = '<section>This native javascript sentence is in a green box <mark>with these words highlighted</mark>?</section>'; + + frag = document.createDocumentFragment(); + frag.appendChild(div); + div.innerHTML += '<section>This native javascript sentence is also in a green box <mark>with these words highlighted</mark>?</section>'; + document.body.appendChild(frag); + + frag = document.createDocumentFragment(); + fragDiv = frag.appendChild(document.createElement('div')); + fragDiv.innerHTML = '<section>This native javascript sentence is in a green box <mark>with these words highlighted</mark>?</section>'; + document.body.appendChild(fragDiv); + + jQuery(document.body).append('<section>This jQuery 1.6.4 sentence is in a green box <mark>with these words highlighted</mark>?</section><section>This jQuery 1.6.4 sentence is in a green box <mark>with these words highlighted</mark>?</section>'); + } + + var time = document.getElementById('time'); + var cur = new Date().getTime(); + + for(var i = 0; i < 1000; i++){ + addDom(); + } + time.innerHTML = new Date().getTime() - cur; + </script> + <body> +</html>
\ No newline at end of file |
