WICG / scroll-to-text-fragment

Proposal to allow specifying a text snippet in a URL fragment
Other
589 stars 42 forks source link

Move location.fragmentDirective to document.fragmentDirective #130

Closed bokand closed 4 years ago

bokand commented 4 years ago

See https://crbug.com/1057795 and https://github.com/whatwg/html/issues/5523

Basically, window.location is special in all kinds of ways and is spec'd to represent the URL of its document's browsing context's active document, not the Document itself. If we start adding things to fragmentDirective this would allow cross-origin access to values which is bad.

Moving fragmentDirective to live on document seems like a more safe and natural place for it.

tomayac commented 4 years ago

FYI, updated the article accordingly: https://github.com/GoogleChrome/web.dev/pull/3661.