Bug 294956
| Summary: | Setting innerHTML doesn't always use a scoped custom element registry associated with the context object | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
| Component: | New Bugs | Assignee: | Ryosuke Niwa <rniwa> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 154907 | ||
Ryosuke Niwa
e.g.
```js
const registry = new CustomElementRegistry;
const someElement = document.createElement('span', {customElementRegistry: registry});
someElement.innerHTML = `<span></span>`;
```
Then `someElement.querySelector("span").customElementRegistry` should be `registry` but it's `window.customElements` instead.
This bug was caught by WPT with https://github.com/web-platform-tests/wpt/pull/53171
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ryosuke Niwa
Pull request: https://github.com/WebKit/WebKit/pull/47167
EWS
Committed 296637@main (78eef71291c8): <https://commits.webkit.org/296637@main>
Reviewed commits have been landed. Closing PR #47167 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/154333132>