Skip to content

Commit 32c1a7d

Browse files
committed
Add test for Noah's Ark Clause details
1 parent 59f74a9 commit 32c1a7d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<meta charset=utf-8>
3+
<title>Test that the Noah's Ark Clause compares attributes as they were when the elements were created by the parser</title>
4+
<link rel="author" href="mailto:[email protected]">
5+
<link rel="help" href="https://html.spec.whatwg.org/#push-onto-the-list-of-active-formatting-elements">
6+
<script src=/resources/testharness.js></script>
7+
<script src=/resources/testharnessreport.js></script>
8+
<span>
9+
<i>
10+
<script>
11+
document.querySelector("i").dataset.foo = "bar";
12+
</script>
13+
<i data-foo="bar">
14+
<i data-foo="bar">
15+
<i data-foo="bar">
16+
</span>
17+
<span id="wrapped">This should be wrapped in 4 i-elements.</span>
18+
<script>
19+
promise_test(async function(t) {
20+
assert_equals(String(document.querySelector("i > i > i > i > #wrapped")), "[object HTMLSpanElement]");
21+
}, "Modifications done to an element after creation need to be ignored by the list of active formatting elements. (by the 'Noah's Ark Clause' in particular)");
22+
</script>

0 commit comments

Comments
 (0)