@readium/navigator-html-injectables
Version:
An embeddable solution for connecting frames of HTML publications with a Readium Navigator
25 lines (24 loc) • 994 B
TypeScript
import { Locator } from "@readium/shared";
import type { getCssSelector } from "css-selector-generator";
type BlockedEventData = [0, Function, any[], any[]] | [1, Event, EventTarget];
export interface EPUBReadingSystem {
name: string;
version: string;
layoutStyle: "paginated" | "scrolling";
hasFeature: (feature: string, version?: string) => boolean;
}
export interface ReadiumWindow extends Window {
_readium_blockEvents: boolean;
_readium_blockedEvents: BlockedEventData[];
_readium_eventBlocker: EventListenerOrEventListenerObject;
_readium_cssSelectorGenerator: {
getCssSelector: typeof getCssSelector;
};
navigator: Navigator & {
epubReadingSystem?: EPUBReadingSystem;
};
}
export declare function deselect(wnd: ReadiumWindow): void;
export declare function nearestInteractiveElement(element: Element): Element | null;
export declare function findFirstVisibleLocator(wnd: ReadiumWindow, scrolling: boolean): Locator;
export {};