Event methods
In order to react to user behavior, we need to register our handlers using these event methods. Note that many DOM events only apply to certain element types; these subtleties are not covered here. Event methods are discussed in detail in Chapter 3.
Binding
Event Method |
Description |
---|---|
|
Bind |
|
Bind |
|
Bind |
|
Remove the bindings on the element (for an event type, a particular handler, or all bindings) |
|
Bind |
|
Remove the bindings on the element previously bound with |
|
Bind |
|
Bind a map of handlers to be called when the given types of events are sent to a descendant element matching |
|
Remove the bindings on the element previously bound with |
Shorthand binding
Event Method |
Description |
---|---|
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
|
Bind |
Special shorthands
Event Method |
Description |
---|---|
|
Bind |
|
Bind |
Triggering
Event Method |
Description |
---|---|
|
Trigger handlers for the event on the element, and execute the default action for the event |
|
Trigger handlers for the event on the element without executing any default actions |
Shorthand triggering
Event Method |
Description |
---|---|
|
Trigger the |
|
Trigger the |
|
Trigger the |
|
Trigger the |
|
Trigger the |
|
Trigger the |
|
Trigger the |
|
Trigger the |
|
Trigger the |
|
Trigger the |
|
Trigger the |
Utility
Event Method |
Description |
---|---|
|
Create a new function that executes with the given context |