PageNavigationFieldUI Class
Represents a field in the PDF viewer toolbar that allows users to navigate to specific pages by entering page numbers.
export declare class PageNavigationFieldUI implements VisibilityElement, EventElement<PageNavigationFieldEventMap>
- Inheritance:
-
PageNavigationFieldUI
Remarks
This component provides functionality for direct page navigation through user input, handling page number changes and validation.
Properties
isVisible
The current visibility state of the element.
get isVisible(): boolean;
set isVisible(value: boolean);
Parameters
-
value
The new visibility state (true to show, false to hide).
Methods
addEventListener(K, (event: PageNavigationFieldEventMap[K]) => void)
Adds an event listener for the specified event type.
addEventListener<K extends keyof PageNavigationFieldEventMap>(type: K, listener: (event: PageNavigationFieldEventMap[K]) => void): void;
Parameters
-
type
The event type/name to listen for.
-
listener
The callback function that will be invoked when the event is emitted.
setInput(string)
Sets the input value and handles page navigation.
setInput(value: string): void;
Parameters
-
value
The page number string to navigate to.