Type Parameters
- TTarget extends AnyDOMEventTargetLoose
- TType extends
| "input"
| "progress"
| "select"
| "DOMContentLoaded"
| "devicemotion"
| "deviceorientation"
| "deviceorientationabsolute"
| "gamepadconnected"
| "gamepaddisconnected"
| "orientationchange"
| "abort"
| "animationcancel"
| "animationend"
| "animationiteration"
| "animationstart"
| "auxclick"
| "beforeinput"
| "beforematch"
| "beforetoggle"
| "blur"
| "cancel"
| "canplay"
| "canplaythrough"
| "change"
| "click"
| "close"
| "compositionend"
| "compositionstart"
| "compositionupdate"
| "contextlost"
| "contextmenu"
| "contextrestored"
| "copy"
| "cuechange"
| "cut"
| "dblclick"
| "drag"
| "dragend"
| "dragenter"
| "dragleave"
| "dragover"
| "dragstart"
| "drop"
| "durationchange"
| "emptied"
| "ended"
| "error"
| "focus"
| "focusin"
| "focusout"
| "formdata"
| "gotpointercapture"
| "invalid"
| "keydown"
| "keypress"
| "keyup"
| "load"
| "loadeddata"
| "loadedmetadata"
| "loadstart"
| "lostpointercapture"
| "mousedown"
| "mouseenter"
| "mouseleave"
| "mousemove"
| "mouseout"
| "mouseover"
| "mouseup"
| "paste"
| "pause"
| "play"
| "playing"
| "pointercancel"
| "pointerdown"
| "pointerenter"
| "pointerleave"
| "pointermove"
| "pointerout"
| "pointerover"
| "pointerrawupdate"
| "pointerup"
| "ratechange"
| "reset"
| "resize"
| "scroll"
| "scrollend"
| "securitypolicyviolation"
| "seeked"
| "seeking"
| "selectionchange"
| "selectstart"
| "slotchange"
| "stalled"
| "submit"
| "suspend"
| "timeupdate"
| "toggle"
| "touchcancel"
| "touchend"
| "touchmove"
| "touchstart"
| "transitioncancel"
| "transitionend"
| "transitionrun"
| "transitionstart"
| "volumechange"
| "waiting"
| "webkitanimationend"
| "webkitanimationiteration"
| "webkitanimationstart"
| "webkittransitionend"
| "wheel"
| "afterprint"
| "beforeprint"
| "beforeunload"
| "hashchange"
| "languagechange"
| "message"
| "messageerror"
| "offline"
| "online"
| "pagehide"
| "pagereveal"
| "pageshow"
| "pageswap"
| "popstate"
| "rejectionhandled"
| "storage"
| "unhandledrejection"
| "unload"
| "fullscreenchange"
| "fullscreenerror"
| "encrypted"
| "waitingforkey"
| "enterpictureinpicture"
| "leavepictureinpicture"
| "pointerlockchange"
| "pointerlockerror"
| "readystatechange"
| "visibilitychange" = AnyDOMEventType<TTarget>
Returns () => void
An automatic unbinding function to run to deregister the listener upon call
Shortcut for
addEventListener