SVGZoomEvent object
Describes a zoom event.
![]() ![]() |
Syntax
function handler(event) {
// event is ZoomEvent
}
svgElement.addEventListener("SVGZoom",handler,false);
DOM Information
Inheritance Hierarchy
Members
The SVGZoomEvent object has these types of members:
Methods
The SVGZoomEvent object has these methods.
| Method | Description |
|---|---|
| initEvent |
Initializes a new generic event that the createEvent method created.
Important As of Microsoft Edge, the
createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information. |
| initUIEvent |
Initializes a new user interface event that the createEvent method created.
Important As of Microsoft Edge, the
createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information. |
| preventDefault |
Cancels the default action of an event. |
| stopImmediatePropagation |
Prevents any further propagation of an event. |
| stopPropagation |
Prevents propagation of an event beyond the current target. |
Properties
The SVGZoomEvent object has these properties.
| Property | Description |
|---|---|
|
Gets a value that indicates whether an event propagates up from the event target. | |
|
Gets a value that indicates whether you can cancel an event's default action. | |
|
Gets or sets a value that indicates whether an event should be stopped from propagating up from the current target. | |
|
Gets the event target that is currently being processed. | |
|
Gets a value that indicates whether the default action should be canceled. | |
|
Gets additional information about an event. | |
|
Gets the event phase that is being evaluated. | |
|
Gets a value that indicates whether a trusted event source created an event. | |
|
Gets the new scale value of a zoom event. | |
|
Gets the new translation values of a zoom event. | |
|
Gets the previous scale value of a zoom event. | |
|
Gets the previous translation values of a zoom event. | |
|
Gets the element that the event was originally dispatched to. Compare to target. | |
|
Gets the element that is the target of the event. | |
|
Gets the time, in milliseconds, when an event occurred. | |
|
Gets the name of an event. | |
|
Gets the window object that an event is generated from. |
Standards information
- Scalable Vector Graphics: Scripting, Section 18.5.2
Remarks
The zoom event occurs when a user initiates an action that causes the current view of the SVG document (or SVGdocument fragment) to be rescaled (including any change to the svg element's currentScale property).
See also

