<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>326252</bug_id>
          
          <creation_ts>2026-10-04 05:00:30 -0700</creation_ts>
          <short_desc>innerHTML ignores the customelementregistry attribute when the fast-path parser handles the markup</short_desc>
          <delta_ts>2026-10-11 05:01:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Steve Orvell">steveorvell</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2258473</commentid>
    <comment_count>0</comment_count>
    <who name="Steve Orvell">steveorvell</who>
    <bug_when>2026-10-04 05:00:30 -0700</bug_when>
    <thetext>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(&apos;div&apos;);
container.innerHTML = &apos;&lt;div customelementregistry&gt;&lt;/div&gt;&apos;;
container.firstChild.customElementRegistry; // expected null; actual: the global registry

container.innerHTML = &apos;&lt;div customelementregistry&gt;&lt;x-a&gt;&lt;/x-a&gt;&lt;/div&gt;&apos;;
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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2261403</commentid>
    <comment_count>1</comment_count>
    <who name="Steve Orvell">steveorvell</who>
    <bug_when>2026-10-09 07:09:41 -0700</bug_when>
    <thetext>Note, this issue also occurs using `setHTMLUnsafe`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2262113</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-10-11 05:01:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/189743339&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>