
Sign up to save your podcasts
Or


Scroll chain builder and overscroll chaining logic. Blink’s EventHandler is responsible for building the scroll chain (the sequence of nested scrollable ancestors) when the user scrolls an element . It determines how scroll events propagate up through parent containers and when to terminate the chain. Crucially, it respects the CSS overscroll-behavior of each element to decide if overscroll should propagate or stop at that element. For example, if an inner element is scrolled to its boundary, by default the scroll chains to its parent – but if that element’s style has overscroll-behavior: contain or none, the chain is broken and the overscroll is handled locally . To implement non-root elastic overscroll, one must modify how EventHandler (and associated scroll logic) interprets these style flags and sends overscroll events: instead of always bubbling to the root, it should allow an overscroll at the element itself when appropriate. In short, EventHandler is where the blink style system meets input: it ensures the scroll chain and overscroll-behavior rules are applied, so the developer must understand it to route overscroll to non-root scrollers.
By Free DebreuilScroll chain builder and overscroll chaining logic. Blink’s EventHandler is responsible for building the scroll chain (the sequence of nested scrollable ancestors) when the user scrolls an element . It determines how scroll events propagate up through parent containers and when to terminate the chain. Crucially, it respects the CSS overscroll-behavior of each element to decide if overscroll should propagate or stop at that element. For example, if an inner element is scrolled to its boundary, by default the scroll chains to its parent – but if that element’s style has overscroll-behavior: contain or none, the chain is broken and the overscroll is handled locally . To implement non-root elastic overscroll, one must modify how EventHandler (and associated scroll logic) interprets these style flags and sends overscroll events: instead of always bubbling to the root, it should allow an overscroll at the element itself when appropriate. In short, EventHandler is where the blink style system meets input: it ensures the scroll chain and overscroll-behavior rules are applied, so the developer must understand it to route overscroll to non-root scrollers.