window.captureEvents()

JavaScript1.2+, JScript3.0+ Nav4+, IE4+ Syntax

							window.captureEvents(event)
window.captureEvents(event1 | event2 | eventN)

Description

The captureEvents() method of the Window object captures all the events of the event type passed. Because you can capture the events that are natively handled by the language itself, programmers can now define a function to handle events in a manner they want. If you have multiple events that you want to capture, separate them with the pipe, |, character. The types of events that can be captured are as follows:

  • Event.ABORT

  • Event.BLUR

  • Event.CHANGE

  • Event.CLICK

  • Event.DBLCLICK

  • Event.DRAGDROP

  • Event.ERROR

  • Event.FOCUS

  • Event.KEYDOWN

  • Event.KEYPRESS

  • Event.KEYUP

  • Event.LOAD

  • Event.MOUSEDOWN ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.