SVGStringList:removeItem() 方法

Baseline 已廣泛支援

此特性已相當成熟,可在許多裝置和瀏覽器版本上使用。自 ⁨2015 年 7 月⁩以來,各瀏覽器均已提供此特性。

SVGStringList 介面的 removeItem() 方法會從列表中移除指定索引處的現有項。

語法

js
removeItem(index)

引數

index

一個非負整數,指定要刪除的項的索引。

返回值

從列表中移除的字串。

異常

NoModificationAllowedError DOMException

如果 SVGStringList 對應於只讀屬性或物件本身是隻讀的,則會丟擲此錯誤。

IndexSizeError DOMException

當索引超出列表範圍時丟擲。

規範

規範
Scalable Vector Graphics (SVG) 2
# __svg__SVGNameList__removeItem

瀏覽器相容性