• Juan Corona's avatar
    Emit an event on the Guest element, ‘scrollToRange’ · 139e16fe
    Juan Corona authored
    This allows attached handlers to hook into the behaviour of bringing a highlight anchor into view.
    The event.detail property contains a native DOM range representing the anchor.
    The default scroll behaviour can be prevented with the event.preventDefault method.
    The event bubbles upward, meaning a handler could be attached at the guest root element  - right now the document’s body element - and any ancestor.
    body -> documentElement -> document -> window
    139e16fe
guest-test.coffee 20.6 KB