Mobile Document Scanner API Reference / ButtonEvent
Interface: ButtonEvent<Button>
Defined in: src/settings/buttons.ts:96
The event that the onClick handler of a button gets. It works like the DOM event that it replaces, with one difference. The document scanner waits for the handler before it acts, so preventDefault() still works after an await.
Type Parameters
Button
Button extends string = string
Properties
button
readonlybutton:Button
Defined in: src/settings/buttons.ts:98
The name of the button that the user pressed.
defaultPrevented
readonlydefaultPrevented:boolean
Defined in: src/settings/buttons.ts:106
Whether the handler called preventDefault().
mode?
readonlyoptionalmode?:"filter"| keyof RectifyModes
Defined in: src/settings/buttons.ts:102
The mode that the screen shows, if it shows one.
phase
readonlyphase:PhaseName
Defined in: src/settings/buttons.ts:100
The phase of the screen that shows the button.
Methods
preventDefault()
preventDefault():
void
Defined in: src/settings/buttons.ts:104
Stop the default action of the button.
Returns
void