ViewerEvent Interface
Represents a base event interface for the PDF viewer that provides functionality similar to the standard DOM Event interface, allowing events to be canceled.
export declare interface ViewerEvent
Remarks
This interface defines the core event handling capabilities including:
- The ability to check if an event's default action has been prevented.
- The ability to prevent the default action of an event.
Fields
defaultPrevented
Gets a value indicating whether the event's default action has been canceled.
readonly defaultPrevented: boolean;
Remarks
The defaultPrevented read-only property returns true if the call to Event.preventDefault() canceled the event, otherwise it returns false.
Methods
preventDefault
Cancels the event if it is cancelable, without stopping further propagation of the event.
preventDefault(): void;
Remarks
This method call indicates that the event's default action should be prevented. If the event is not cancelable, this method has no effect. The event can be prevented to stop the default behavior from occurring.