The load
event fires on an SVGElement
when it is loaded in the browser, e.g. in the DOM in the case of an embedded <svg>
. It is basically the same as the standard load
DOM event.
Bubbles | No |
---|---|
Cancelable | No |
Interface | SVGEvent |
Event handler property | onload |
Examples
svgElem.addEventListener('load', () => { console.log('SVG loaded.'); })
Specifications
Specification | Status | Comment |
---|---|---|
Scalable Vector Graphics (SVG) 2 The definition of 'load' in that specification. |
Candidate Recommendation | Initial definition |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
load event | Chrome Full support Yes | Edge Full support ≤79 | Firefox
Full support
Yes
| IE ? | Opera ? | Safari ? | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android
Full support
Yes
| Opera Android ? | Safari iOS ? | Samsung Internet Android Full support Yes |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown
- Uses a non-standard name.
- Uses a non-standard name.