diff options
author | Alex Yatskov <alex@foosoft.net> | 2020-05-22 17:46:16 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2020-05-22 17:46:16 -0700 |
commit | 1480288561cb8b9fb87ad711d970c548329fea98 (patch) | |
tree | 87c2247f6d144407afcc6de316bbacc264582248 /test/data/html/test-document3-frame1.html | |
parent | f2186c51e4ef219d158735d30a32bbf3e49c4e1a (diff) | |
parent | d0dcff765f740bf6f0f6523b09cb8b21eb85cd93 (diff) |
Merge branch 'master' into testing
Diffstat (limited to 'test/data/html/test-document3-frame1.html')
-rw-r--r-- | test/data/html/test-document3-frame1.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/data/html/test-document3-frame1.html b/test/data/html/test-document3-frame1.html new file mode 100644 index 00000000..2ae906d2 --- /dev/null +++ b/test/data/html/test-document3-frame1.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width,initial-scale=1" /> + <title>Yomichan Manual Performance Tests</title> + <link rel="stylesheet" href="test-stylesheet.css" /> + </head> +<body><div class="content"> + + <div class="description">Add elements</div> + + <div> + <a href="#" id="add-elements-1000">1000</a> + <a href="#" id="add-elements-10000">10000</a> + <a href="#" id="add-elements-100000">100000</a> + <a href="#" id="add-elements-1000000">1000000</a> + <script> +document.querySelector('#add-elements-1000').addEventListener('click', () => addElements(1000), false); +document.querySelector('#add-elements-10000').addEventListener('click', () => addElements(10000), false); +document.querySelector('#add-elements-100000').addEventListener('click', () => addElements(100000), false); +document.querySelector('#add-elements-1000000').addEventListener('click', () => addElements(1000000), false); + +let counter = 0; + +function addElements(amount) { + const container = document.querySelector('#container'); + for (let i = 0; i < amount; i++) { + const element = document.createElement('div'); + element.textContent = 'ありがとう'; + container.appendChild(element); + } + + counter += amount; + document.querySelector('#counter').textContent = counter; +} + </script> + </div> + + <div id="counter"></div> + <div id="container"></div> + +</div></body> +</html> |