Skip to content

PageList

Continuous page view: lays out every page of a document one below the other inside a scroll container, renders only the pages near the visible area, and reports which page is current while the user scrolls.

Framework-neutral; the React and Vue viewers wrap it.

new PageList(
scroller,
host,
options?
): PageList;
Parameter Type Description
scroller HTMLElement the scrolling element (overflow: auto)
host HTMLElement element inside scroller that receives the page slots
options PageListOptions -

PageList

get currentPage(): number;

Index of the page currently considered visible.

number


get pageElements(): readonly HTMLElement[];

Page slot elements, one per page.

readonly HTMLElement[]

destroy(): void;

void


scrollToPage(index): void;

Scrolls so the top of a page is at the top of the scroll container.

Parameter Type
index number

void


update(next): void;

Applies new inputs. Rebuilds the slots when the document or zoom changed.

Parameter Type
next PageListState

void