SVGElement: load-Ereignis
Das load
-Ereignis wird bei einem SVGElement
ausgelöst, wenn es im Browser geladen wird, z.B. im DOM im Fall eines eingebetteten <svg>
. Es ist im Grunde dasselbe wie das standardmäßige load
-DOM-Ereignis.
Dieses Ereignis kann nicht abgebrochen werden und nicht nach oben geleitet (bubbled) werden.
Syntax
Verwenden Sie den Ereignisnamen in Methoden wie addEventListener()
, oder setzen Sie eine Ereignishandler-Eigenschaft.
js
addEventListener("load", (event) => {});
onload = (event) => {};
Ereignistyp
Ein generisches Event
.
Beispiele
js
svgElem.addEventListener("load", () => {
console.log("SVG loaded.");
});
Spezifikationen
Specification |
---|
Scalable Vector Graphics (SVG) 2 # LoadEvent |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
load event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- See implementation notes.
- Uses a non-standard name.
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.