Construct a new device shake handler.
Optional
options: Partial<ShakeOptions>The options for the handler.
Add a new shake event listener.
The type of the event to handle.
The event handler to call.
Optional
options: boolean | AddEventListenerOptionsThe options for this handler.
Dispatch a shake event.
The event to dispatch.
true if the event was cancelled, false otherwise.
Removes a previously added event listener.
The type of the event to remove.
The event handler to remove.
Optional
options: boolean | EventListenerOptionsThe options the event handler was added with.
A device motion handler that dispatches a
"shake"
event as appropriate.Original author: Jesse Jackson - https://github.com/jsejcksn This part of the code is licensed under CC BY-SA 4.0