WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
326252
innerHTML ignores the customelementregistry attribute when the fast-path parser handles the markup
https://bugs.webkit.org/show_bug.cgi?id=326252
Summary
innerHTML ignores the customelementregistry attribute when the fast-path pars...
Steve Orvell
Reported
2026-10-04 05:00:30 PDT
An element parsed with the customelementregistry attribute should get a null custom element registry. innerHTML gives it the global registry when the markup is simple enough for the fast-path parser, for example only built-in elements. When the full parser runs, for example because the markup contains a custom element name, it correctly gets null, as it does with setHTMLUnsafe. Example: const container = document.createElement('div'); container.innerHTML = '<div customelementregistry></div>'; container.firstChild.customElementRegistry; // expected null; actual: the global registry container.innerHTML = '<div customelementregistry><x-a></x-a></div>'; container.firstChild.customElementRegistry; // null, correctly Repro:
https://codepen.io/editor/Steve-Orvell/pen/01a0feea-f951-796a-ac95-736667cfe103
Spec:
https://github.com/whatwg/html/pull/12000
(renames the attribute scopedcustomelementregistry), DOM side:
https://github.com/whatwg/dom/pull/1500
Same bug in Chromium:
https://issues.chromium.org/issues/568822825
Attachments
Add attachment
proposed patch, testcase, etc.
Steve Orvell
Comment 1
2026-10-09 07:09:41 PDT
Note, this issue also occurs using `setHTMLUnsafe`.
Radar WebKit Bug Importer
Comment 2
2026-10-11 05:01:16 PDT
<
rdar://problem/189743339
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug