WICG / scroll-to-text-fragment

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

Specify how a Range is the indicated part of the document #67

Closed nickburris closed 4 years ago

nickburris commented 4 years ago

This patch specifies how a Range is used as the indicated part of the document. It refactors the "scroll rect into view" part of the CSSOM's scroll element into view algorithm so that it can be reused in an algorithm scrolling a Range into view. The indicated part of the document can now be specified as a Range in addition to an Element, where the element becomes the Document's target element and the Range is used for the scroll into view position.

Fixes #66

nickburris commented 4 years ago

Thanks!