SVGElement: load イベント
load
イベントは SVGElement
がブラウザーに読み込まれたときに発生するイベントです。これは基本的に標準の load
DOM イベントと同じです。
このイベントはキャンセル不可で、バブリングしません。
構文
このイベント名を addEventListener()
などのメソッドで使用するか、イベントハンドラープロパティを設定するかしてください。
js
addEventListener("load", (event) => {});
onload = (event) => {};
イベント型
一般的な Event
です。
例
js
svgElem.addEventListener("load", () => {
console.log("SVG が読み込まれました。");
});
仕様書
Specification |
---|
Scalable Vector Graphics (SVG) 2 # LoadEvent |
ブラウザーの互換性
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.