| testRunner.waitUntilDone(); |
| iframe = document.createElement('iframe'); |
| document.body.appendChild(iframe); |
| iframe.onload = continueTest; |
| iframe.src = 'custom-element-reaction-within-disallowed-scope.html'; |
| function continueTest() { |
| iframe.src = 'custom-element-reaction-within-disallowed-scope.html#target'; |
| document.getElementById('result').textContent = didChange |
| ? 'PASS - WebKit did not hit an assertion' |
| : 'FAIL - The code to trigger a custom element reaction never ran'; |
| document.write('<p>This tests enqueuing a custom element reaction inside an API with CEReaction=NotNeeded. WebKit should not hit a debug assertion.</p>'); |
| window.onload = startTest; |
| document.write('<p><a id="target" href="#">child target</a></p>'); |
| class SomeElement extends HTMLElement { }; |
| customElements.define('some-element', SomeElement); |
| document.getElementById('target').addEventListener('focus', () => { |
| document.body.appendChild(new SomeElement); |