1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
content / test / data / accessibility / event / lang-changed.html [blame]
<!DOCTYPE html>
<!-- Adding a lang will cause a normally ignored node to be included in the Blink tree, but it is still ignored on the platform layer. Adding an id causes it to be included n the platform layer as well -->
<div>
<div>
<span>
<input type="checkbox">Gift</input>
</span>
</div>
</div>
<script>
const span = document.querySelector('span');
const cbox = document.querySelector('input');
const go_passes = [
() => span.setAttribute('lang', "de-DE"),
() => { span.id = 'xyz'; cbox.checked = true; },
() => { span.removeAttribute('id'); cbox.checked = false; },
() => span.removeAttribute('lang'),
];
var current_pass = 0;
function go() {
go_passes[current_pass++].call();
return current_pass < go_passes.length;
}
</script>