repo.or.cz
/
chromium-blink-merge.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge Chromium + Blink git repositories
[chromium-blink-merge.git]
/
third_party
/
WebKit
/
PerformanceTests
/
DOM
/
modify-element-id.html
blob
e1d559c1ed8350dd70f9bbc521bddbefda2f1493
1
<!DOCTYPE
html
>
2
<html>
3
<body>
4
<script
src
=
"../resources/runner.js"
></script>
5
<script>
6
var
element
;
7
8
PerfTestRunner
.
measureTime
({
9
description
:
"Measures performance of changing a DOM element's id property."
,
10
11
setup
:
function
() {
12
element
=
document
.
createElement
(
'div'
);
13
},
14
15
run
:
function
() {
16
for
(
var
i
=
0
;
i
<
500000
; ++
i
) {
17
element
.
id
=
'id1'
;
18
element
.
id
=
'id2'
;
19
}
20
}
21
});
22
</script>
23
</body>
24
</html>