commit | 90d8d30d6ccc96cec77aa66619e085ca4e6f11df | [log] [tgz] |
---|---|---|
author | Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> | Tue Feb 09 01:56:00 2021 |
committer | GitHub <noreply@github.com> | Tue Feb 09 01:56:00 2021 |
tree | ffef802fac725d162a39fb9c97d8ae63799b52cf | |
parent | 83ca214ee3ca6b8d610c26cce75c2c06fde113e3 [diff] |
[shadow-dom] shadow-dom/nested-slot-remove-crash.html should use `let` instead of `const` to declare variables (#27510) 1. If this code runs on Chromium/Firefox/WebKit, [this test](https://github.com/web-platform-tests/wpt/blob/master/shadow-dom/nested-slot-remove-crash.html) does not crash. 2. But by the browser's developer tools console, the execution is stopped at https://github.com/web-platform-tests/wpt/blob/0fa6dc568c006811e1fc0035d3b9c70dd7efadf5/shadow-dom/nested-slot-remove-crash.html#L30 by `SyntaxError`. - By the comment, I seem this test is expected to reach to https://github.com/web-platform-tests/wpt/blob/0fa6dc568c006811e1fc0035d3b9c70dd7efadf5/shadow-dom/nested-slot-remove-crash.html#L39-L40. 3. By pull requests which imported this tests, I feel their original bug is related to DOM. - https://github.com/web-platform-tests/wpt/pull/26951 - https://github.com/web-platform-tests/wpt/pull/27001 So I think this `root` should be declare by `let` instead of `const`.
diff --git a/shadow-dom/nested-slot-remove-crash.html b/shadow-dom/nested-slot-remove-crash.html index 3081dd6..d53b3b4 100644 --- a/shadow-dom/nested-slot-remove-crash.html +++ b/shadow-dom/nested-slot-remove-crash.html
@@ -8,7 +8,7 @@ <span>This test passes if the renderer does not crash.</span> <script> - const root = host.attachShadow({mode:"open"}); + let root = host.attachShadow({mode:"open"}); root.innerHTML = ` <slot id=outer1 name=outer> <slot id=inner1 name=inner>Fallback</slot> @@ -27,7 +27,7 @@ // The renderer should not crash here: root.querySelector("#outer2").remove(); - const root = host.attachShadow({mode:"open"}); + root = host.attachShadow({mode:"open"}); root.innerHTML = ` <slot id=outer3> <slot id=inner3>