WICG / webcomponents

Web Components specifications
Other
4.34k stars 371 forks source link

What's the right target of anchor link inside shadowDom #1048

Open woody-li opened 5 months ago

woody-li commented 5 months ago

Current anchor link resolves with outer targets, but don't resolve inner target.

Is it right for inner target?

<custom-element>
    #shadow-root
        <a href="#outer">Goto outer</a>
        <a href="#inner">Goto inner</a>
        <br />
        <p id="inner">Inner target</p>
</custom-element>
<p id="outer">Outer target</p>