WICG / scroll-to-text-fragment

Proposal to allow specifying a text snippet in a URL fragment
Other
586 stars 43 forks source link

Restrict text directives to text/html and text/plain #246

Closed bokand closed 8 months ago

bokand commented 8 months ago

Technically, HTML fragment indication and scrolling is defined only for HTML documents. However, in practice, browsers use it for other types as well. Safari invokes text directives for multiple text-based media types while Chrome restricts itself to text/html and text/plain, avoiding other types for security reasons (see https://crbug.com/1270469).

Make this explicit in the spec, though perhaps this should be made explicit elsewhere (e.g. RFC 5147 defines fragment identifiers for text/plain).


Preview | Diff