ScrollPositionMaintainer Class

A helper class to recursively save and restore scroll positions. Usage:

// scroll positions are saved when `ScrollPositionMaintainer` object is created
const maintainer = new ScrollPositionMaintainer(element);
// can do something with `element` here
// disposing the `maintainer` object restores scroll positions
maintainer.dispose();

Implements

Methods

Name Description
constructor(el: Element): ScrollPositionMaintainer    
dispose(): void    

Defined in

Last Updated: 20 June, 2023