Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
insertItemBefore() は SVGPointList インターフェイスのメソッドで、点をリスト内の他のアイテムの前に挿入します。
挿入される点の座標が入っている SVGPoint オブジェクトです。
indexオブジェクトをその前に挿入するアイテムのインデックスです。渡されたインデックスがリストの長さを上回る場合、インデックスはリストの長さに設定され、アイテムはリスト内の末尾のアイテムの前に挿入されます。
挿入された SVGPoint オブジェクトです。
リストが読み取り専用である場合に発生します。
次の例では、 SVG の中に 5 つの座標ペアを持つ <polyline> があります。新しい SVGPoint が作成され、インデックス 2 の位置の前にその点を挿入します。
| Scalable Vector Graphics (SVG) 2 # __svg__SVGNameList__insertItemBefore |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年4月4日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.