JavaScriptイベント一覧

目次

イベント

Window
window.addEventListener("load", (e) => { ... });
Document
document.addEventListener("DOMContentLoaded", (e) => { ... });
Element
const element = document.getElementById(id);
element.addEventListener("click", (e) => { ... });
HTMLElement HTMLFormElement HTMLCanvasElement HTMLMediaElement MediaRecorder OfflineAudioContext FontFaceSet XMLHttpRequest XRSession ScriptProcessorNode WebSocket Mutation PaymentRequest ServiceWorkerGlobalScope HIDDevice RTCPeerConnection IDBOpenDBRequest

イベントオブジェクト

Event

Events:
  Window
    afterprint
    appinstalled
    beforeinstallprompt
    beforeprint
    languagechange
    load
    offline
    online
    orientationchange [Deprecated]
    resize
    unload [Deprecated]
  Document
    afterscriptexecute [Experimental]
    beforescriptexecute [Experimental]
    DOMContentLoaded
    fullscreenchange
    fullscreenerror
    pointerlockchange
    pointerlockerror
    prerenderingchange
    readystatechange
    scroll
    scrollend
    selectionchange
    visibilitychange
  Element
    afterscriptexecute [Non-standard]
    beforematch
    scroll
    scrollend
  HTMLElement
    cancel
    change
    load
    mscandidatewindowhide [Non-standard]
    mscandidatewindowshow [Non-standard]
    mscandidatewindowupdate [Non-standard]
  HTMLFormElement
    reset
  HTMLCanvasElement
    contextlost [Experimental]
    contextrestored [Experimental]
  HTMLMediaElement
    abort
    canplay
    canplaythrough
    durationchange
    emptied
    ended
    error
    loadeddata
    loadedmetadata
    loadstart
    negotiationneeded
    play
    playing
    progress
    ratechange
    seeked
    seeking
    stalled
    suspend
    timeupdate
    volumechange
    waiting
  MediaRecorder
    pause
    resume
    start
    stop
  XMLHttpRequest
    readystatechange
  WebSocket
    open
  RTCPeerConnection
    connectionstatechange
    fullscreenchange
    fullscreenerror
    icegatheringstatechange
    signalingstatechange
  ServiceWorkerGlobalScope
    pushsubscriptionchange
Properties:
  bubbles
  cancelable
  composed
  currentTarget
  defaultPrevented
  eventPhase
  isTrusted
  target
  timeStamp
  type
  cancelBubble [Deprecated]
  explicitOriginalTarget [Non-standard]
  originalTarget [Non-standard]
  returnValue [Deprecated]
  scoped [Deprecated]
Methods:
  composedPath()
  preventDefault()
  stopImmediatePropagation()
  stopPropagation()
  initEvent() [Deprecated]

AnimationEvent

Events:
  animationstart
  animationend
  animationiteration
  animationcancel
Properties:
  Event
  animationName
  elapsedTime
  pseudoElement
Methods:
  Event

AudioProcessingEvent [Deprecated]

Events:
  audioprocess [Deprecated]
Properties:
  Event
  playbackTime [Deprecated]
  inputBuffer [Deprecated]
  outputBuffer [Deprecated]
Methods:
  Event

BackgroundFetchEvent

Events:
  backgroundfetchabort [Experimental]
  backgroundfetchclick [Experimental]
Properties:
  ExtendableEvent
  registration [Experimental]
Methods:
  ExtendableEvent

BackgroundFetchUpdateUIEvent

Events:
  backgroundfetchfail [Experimental]
  backgroundfetchsuccess [Experimental]
Properties:
  BackgroundFetchEvent
Methods:
  BackgroundFetchEvent

BeforeUnloadEvent

Events:
  beforeunload
Properties:
  Event
  returnValue [Deprecated]
Methods:
  Event

BlobEvent

Events:
  dataavailable
Properties:
  Event
  data
  timecode
Methods:
  Event

CanMakePaymentEvent

Events:
  canmakepayment [Experimental]
Properties:
  ExtendableEvent
Methods:
  ExtendableEvent

ClipboardEvent

Events:
  copy
  cut
  paste
Properties:
  Event
  clipboardData
Methods:
  Event

CloseEvent

Events:
  close
Properties:
  Event
  code
  reason
  wasClean
Methods:
  Event

ContentIndexEvent

Events:
  contentdelete [Experimental]
Properties:
  ExtendableEvent
Methods:
  ExtendableEvent

ContentVisibilityAutoStateChangeEvent

Events:
  contentvisibilityautostatechange
Properties:
  Event
  skipped
Methods:
  Event

CompositionEvent

Events:
  compositionend
  compositionstart
  compositionupdate
Properties:
  UIEvent
  data
  locale [Deprecated]
Methods:
  UIEvent
  initCompositionEvent()

CustomEvent

Events:
  new Event(...)
Properties:
  Event
  detail
Methods:
  Event

DeviceMotionEvent

Events:
  devicemotion
Properties:
  Event
  acceleration
  accelerationIncludingGravity
  rotationRate
  interval
Methods:
  Event

DeviceOrientationEvent

Events:
  deviceorientation
  deviceorientationabsolute
Properties:
  Event
  absolute
  alpha
  beta
  gamma
  webkitCompassHeading [Non-standard]
  webkitCompassAccuracy [Non-standard]
Methods:
  Event

DragEvent

Events:
  drag
  dragend
  dragenter
  dragleave
  dragover
  dragstart
  drop
Properties:
  MouseEvent
  dataTransfer
Methods:
  MouseEvent

ErrorEvent

Events:
  error
Properties:
  Event
  message
  filename
  lineno
  colno
  error
Methods:
  Event

ExtendableCookieChangeEvent

Events:
  cookiechange [Experimental]
Properties:
  ExtendableEvent
Methods:
  ExtendableEvent

ExtendableEvent

Events:
  activate
  install
Properties:
  Event
Methods:
  Event
  waitUntil()

ExtendableMessageEvent

Events:
  message
  messageerror
Properties:
  ExtendableEvent
  data
  origin
  lastEventId
  source
  ports
Methods:
  ExtendableEvent

FetchEvent

Events:
  fetch
Properties:
  Event
  clientId
  handled
  preloadResponse
  replacesClientId
  resultingClientId
  request
Methods:
  Event
  respondWith()
  waitUntil()

FocusEvent

Events:
  blur
  focus
  focusin
  focusout
Properties:
  UIEvent
  relatedTarget
Methods:
  UIEvent

FontFaceSetLoadEvent

Events:
  loading
  loadingdone
  loadingerror
Properties:
  Event
  fontfaces
Methods:
  Event

FormDataEvent

Events:
  formdata
Properties:  
  Event
  formData
Methods:
  Event

GamepadEvent

Events:  
  gamepadconnected
  gamepaddisconnected
Properties:  
  Event
  gamepad
Methods:
  Event

GestureEvent [Non-standard]

Events:
  gesturestart
  gesturechange
  gestureend
Properties:  
  UIEvent
  rotation
  scale
Methods:  
  UIEvent
  initGestureEvent()

HashChangeEvent

Events:
  hashchange
Properties:  
  Event
  newURL
  oldURL
Methods:
  Event

HIDInputReportEvent

Events:
  inputreport
Properties:  
  Event
  data [Experimental]
  device [Experimental]
  reportId [Experimental]
Methods:
  Event

IDBVersionChangeEvent

Events:
  upgradeneeded
Properties:
  Event
  oldVersion
  newVersion
Methods:
  Event

InputEvent

Events:
  beforeinput
  input
Properties:
  UIEvent
  data
  dataTransfer
  inputType
  isComposing
Methods:
  UIEvent
  getTargetRanges()

KeyboardEvent

Events:
  keydown
  keyup
  keypress [Deprecated]
Properties:
  UIEvent
  altKey
  code
  ctrlKey
  isComposing
  key
  location
  metaKey
  repeat
  shiftKey
Methods:
  UIEvent

MediaEncryptedEvent

Events:
  encrypted
Properties:
  Event
  initDataType
  initData
Methods:
  Event

MediaRecorderErrorEvent [Deprecated]

Events:
  error [Deprecated]
Properties:
  Event
Methods:
  Event

MediaStreamEvent [Deprecated]

Events:
  addstream
  removestream
Properties:
  Event
  stream
Methods:
  Event

MerchantValidationEvent[Deprecated]

Events:
  merchantvalidation [Deprecated]
Properties:
  Event
  methodName
  validationURL
Methods:
  Event
  complete()

MessageEvent

Events:
  message
  messageerror
Properties:
  Event
  data
  origin
  lastEventId
  source
  ports
Methods:
  Event
  initMessageEvent() [Deprecated]

MouseEvent

Events:
  dblclick
  mouseup
  mousedown
  mouseenter
  mouseleave
  mousemove
  mouseover
  mouseout  
  webkitmouseforcechanged [Non-standard]
  webkitmouseforcedown [Non-standard]
  webkitmouseforceup [Non-standard]
  webkitmouseforcewillbegin [Non-standard]
  DOMActivate [Deprecated]
Properties:
  UIEvent
  altKey
  button
  buttons
  clientX
  clientY
  ctrlKey
  layerX [Non-standard]
  layerY [Non-standard]
  metaKey
  movementX
  movementY
  offsetX
  offsetY
  pageX
  pageY
  relatedTarget
  screenX
  screenY
  shiftKey
  mozInputSource [Non-standard]
  webkitForce [Non-standard]
  x
  y
Methods:
  UIEvent
  getModifierState()
  initMouseEvent() [Deprecated]

MutationEvent [Duplicated]

Events:
  DOMAttrModified
  DOMAttributeNameChanged
  DOMCharacterDataModified
  DOMElementNameChanged
  DOMNodeInserted
  DOMNodeInsertedIntoDocument
  DOMNodeRemoved
  DOMNodeRemovedFromDocument
  DOMSubtreeModified
Properties:
  UIEvent
  attrChange
  attrName
  newValue
  prevValue
  relatedNode
Methods:
  UIEvent
  initMutationEvent()

NotificationEvent

Events:
  notificationclick
  notificationclose
Properties:
  ExtendableEvent
  notification
  action
Methods:
  ExtendableEvent

OfflineAudioCompletionEvent

Events:
  complete
Properties:
  Event
  renderedBuffer
Methods:
  Event

PaymentRequestEvent

Events:
  paymentrequest [Experimental]
Properties:
  ExtendableEvent
  instrumentKey [Experimental]
  methodData [Experimental]
  modifiers [Experimental]
  paymentRequestId [Experimental]
  paymentRequestOrigin [Experimental]
  topOrigin [Experimental]
  total [Experimental]
Methods:
  ExtendableEvent
  changePaymentMethod() [Experimental]
  openWindow() [Experimental]
  respondWith() [Experimental]

PaymentMethodChangeEvent

Events:
  paymentmethodchange
Properties:
  PaymentRequestUpdateEvent
Methods:
  PaymentRequestUpdateEvent

PaymentRequestUpdateEvent

Events:
  shippingaddresschange [Deprecated] [Non-standard]
  shippingoptionchange [Deprecated] [Non-standard]
Properties:
  ExtendableEvent
Methods:
  ExtendableEvent
  updateWith()

PageTransitionEvent

Events:
  pageshow
  pagehide
Properties:
  Event
  persisted
Methods:
  Event

PeriodicSyncEvent [Experimental]

Events:
  periodicsync [Experimental]
Properties:
  ExtendableEvent
  tag
Methods:
  ExtendableEvent

PointerEvent

Events:
  auxclick
  click
  contextmenu
  pointerover
  pointerenter
  pointerdown
  pointermove
  pointerrawupdate [Experimental]
  pointerup
  pointercancel
  pointerout
  pointerleave
  gotpointercapture
  lostpointercapture
Properties:
  MouseEvent
  altitudeAngle [Experimental]
  azimuthAngle [Experimental]
  pointerId
  height
  pressure
  tangentialPressure
  tiltX
  tiltY
  twist
  pointerType
  isPrimary
Methods:  
  MouseEvent
  getCoalescedEvents()
  getPredictedEvents()

PopStateEvent

Events:
  popstate
Properties:
  Event
  state
Methods:
  Event

ProgressEvent

Events:
  abort
  error
  load
  loadend
  loadstart
  progress
  timeout
Properties:
  Event
  lengthComputable
  loaded
  total
Methods:
  Event

PromiseRejectionEvent

Events:
  rejectionhandled
  unhandledrejection
Properties:
  Event
  promise
  reason
Methods:
  Event

PushEvent

Events:
  push
Properties:
  ExtendableEvent
  data
Methods:
  ExtendableEvent

RTCDataChannelEvent

Events:
  datachannel
Properties:
  Event
  channel
Methods:
  Event

RTCPeerConnectionIceEvent

Events:
  icecandidate
Properties:
  Event
  candidate
Methods:
  Event

RTCPeerConnectionIceErrorEvent

Events:
  icecandidateerror
Properties:
  Event
  address
  errorCode
  errorText
  port
  url
Methods:
  Event

RTCTrackEvent

Events:
  track
Properties:
  Event
  receiver
  streams
  track
  transceiver
Methods:
  Event

SecurityPolicyViolationEvent

Events:
  securitypolicyviolation
Properties:
  Event
  blockedURI
  columnNumber
  disposition
  documentURI
  effectiveDirective
  lineNumber
  originalPolicy
  referrer
  sample
  sourceFile
  statusCode
  violatedDirective 
Methods:
  Event

StorageEvent

Events:
  storage
Properties:
  Event
  key
  newValue
  oldValue
  storageArea
  url
Methods:  
  Event
  initStorageEvent() [Deprecated]

SubmitEvent

Events:
  submit
Properties:
  Event
  submitter
Methods:
  Event

SVGEvent [Deprecated]

Properties:
  Event
  target
  type
  bubbles
  cancelable
Methods:
  Event

SyncEvent

Events:
  sync
Properties:
  ExtendableEvent
  tag
  lastChance
Methods:
  ExtendableEvent

TimeEvent

Properties:
  UIEvent
  detail
  view
Methods:  
  UIEvent
  initTimeEvent()

ToggleEvent

Events:
  toggle
  beforetoggle
Properties:
  Event
  newState
  oldState
Methods:
  Event

TouchEvent

Events:
  touchstart
  touchend
  touchmove
  touchcancel
Properties:
  UIEvent
  altKey
  changedTouches
  ctrlKey
  metaKey
  shiftKey
  targetTouches
  touches
  rotation [Non-standard]
  scale [Non-standard]
Methods:
  UIEvent

TrackEvent

Properties:
  UIEvent
  track
Methods:
  UIEvent

TransitionEvent

Events:
  transitioncancel
  transitionend
  transitionrun
  transitionstart
Properties:
  Event
  propertyName
  elapsedTime
  pseudoElement
Methods:
  Event

UIEvent

Events:
  error
Properties:
  Event
  detail
  sourceCapabilities [Experimental]
  view
  which [Deprecated]
Methods:  
  Event
  initUIEvent() [Deprecated]

VRDisplayEvent [Deprecated]

Events:
  vrdisplayactivate [Deprecated]
  vrdisplayconnect [Deprecated]
  vrdisplaydeactivate [Deprecated]
  vrdisplaydisconnect [Deprecated]
  vrdisplaypresentchange
Properties:
  Event
  display
  reason
Methods:
  Event

WebGLContextEvent

Events:
  webglcontextlost
  webglcontextrestored
  webglcontextcreationerror
Properties:
  Event
  statusMessage
Methods:
  Event

WheelEvent

Events:
  wheel
  mousewheel [Deprecated] [Non-standard]
  MozMousePixelScroll [Deprecated] [Non-standard]
  DOMMouseScroll [Deprecated] [Non-standard]
Properties:
  MouseEvent
  deltaX
  deltaY
  deltaZ
  deltaMode
  wheelDelta [Deprecated]
  wheelDeltaX [Deprecated]
  wheelDeltaY [Deprecated]
Methods:
  MouseEvent

XRSessionEvent

Events:
  beforexrselect
  end [Experimental]
  visibilitychange [Experimental]
Properties:
  Event
  session
Methods:
  Event

XRInputSourcesChangeEvent

Events:
  inputsourceschange [Experimental]
Properties:
  Event
  added
  removed
  session
Methods:
  Event

XRInputSourceEvent

Events:
  select
  selectend
  selectstart
  squeeze
  squeezeend
  squeezestart
Properties:
  Event
  frame
  inputSource
Methods:
  Event