SVGZoom | onzoom event
Occurs when the document zoom level or currentScale property changes.
![]() ![]() |
Syntax
| HTML Attribute | <element onzoom = "handler(event)"> |
|---|---|
| Event Property | object.onzoom = handler; |
| attachEvent Method | object.attachEvent("onzoom", handler) |
| addEventListener Method | object.addEventListener("SVGZoom", handler, useCapture) |
Event information
| Synchronous | No |
|---|---|
| Bubbles | Yes |
| Cancelable | No |
Event handler parameters
- pEvt [in]
-
Type: IDOMUIEvent
The IDOMEvent object.
Standards information
- Scalable Vector Graphics: Scripting, Section 18.4.3
Remarks
The onzoom event occurs when the zoom level of a document view is changed through a direct user interaction or any change to the currentScale property that is available on the svg element. This event applies only to the outermost svg element and is dispatched after the zoom-level modification occurs.
Changes the document's zoom level or currentScale property.
To invoke this event, do one of the following:
- The user changes the zoom level of the document or the value of the svg element's currentScale property.
See also
Show:

