Skip to content

Does not polyfill invokers in declarative shadow DOM #69

@sntran

Description

@sntran

Steps to reproduce

Add an element with declarative shadow DOM with an invoker in it:

<header>
  <template shadowrootmode="open">
    <button command="toggle-popover" commandfor="menu">Menu</button>
    
    <menu id="menu" popover="">
      Menu
    </menu>
  </template>
<header>

Include the polyfill script.

View the page in Safari 18.x.

Here is a codepen for the above: https://codepen.io/sntran/full/LENaVoN

Expected result

  • Clicking Menu button should popover the menu element.

Actual result

  • Nothing happen.

Observations

The polyfill does handle shadow DOM, but it seems that the browser does not call either attachShadow nor attachInternals when declarative shadow DOM is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions