SVGStringList
defines a list of
DOMString
对象。
An
SVGStringList
object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
| Also implement | None |
|---|---|
| 方法 |
|
| 特性 |
|
| Normative document | SVG 1.1 (2nd Edition) |
| 名称 | 类型 | 描述 |
|---|---|---|
numberOfItems
|
unsigned long
|
The number of items in the list. |
length
|
unsigned long
|
A mirror of the value in
numberOfItems
, for consistency with other interfaces.
|
| Name & Arguments | 返回 | 描述 |
|---|---|---|
clear
()
|
void |
Clears all existing current items from the list, with the result being an empty list. Exceptions:
|
initialize
(in
|
DOMString
|
Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. If the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. The return value is the item inserted into the list. Exceptions:
|
getItem
(in unsigned long
index
)
|
DOMString
|
Returns the specified item from the list. The returned item is the item itself and not a copy. Any changes made to the item are immediately reflected in the list. The first item is number 0. Exceptions:
|
insertItemBefore
(in
|
DOMString
|
Inserts a new item into the list at the specified position. The first item is number 0. If
newItem
is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. If the item is already in this list, note that the index of the item to insert before is before the removal of the item. If the
index
is equal to 0, then the new item is inserted at the front of the list. If the index is greater than or equal to
numberOfItems
, then the new item is appended to the end of the list.
Exceptions:
|
replaceItem
(in
|
DOMString
|
Replaces an existing item in the list with a new item. If
newItem
is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. If the item is already in this list, note that the index of the item to replace is before the removal of the item.
Exceptions:
|
removeItem
(in unsigned long
index
)
|
DOMString
|
Removes an existing item from the list. Exceptions:
|
appendItem
(in
|
DOMString
|
Inserts a new item at the end of the list. If
newItem
is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy.
Exceptions:
|
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
SVGStringList
|
Chrome Yes | Edge 12 |
Firefox
12
|
IE 9 | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes |
Firefox Android
14
|
Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
length
非标
|
Chrome Yes | Edge ≤79 | Firefox 13 | IE ? | Opera Yes | Safari ? | WebView Android Yes | Chrome Android Yes | Firefox Android 14 | Opera Android Yes | Safari iOS ? | Samsung Internet Android Yes |
完整支持
兼容性未知
非标。预期跨浏览器支持较差。
见实现注意事项。
SVGStringList
SVGAElement
SVGAltGlyphElement
SVGAngle
SVGAnimateColorElement
SVGAnimateElement
SVGAnimateMotionElement
SVGAnimateTransformElement
SVGAnimatedAngle
SVGAnimatedBoolean
SVGAnimatedEnumeration
SVGAnimatedInteger
SVGAnimatedLength
SVGAnimatedLengthList
SVGAnimatedNumber
SVGAnimatedNumberList
SVGAnimatedPathData
SVGAnimatedPoints
SVGAnimatedPreserveAspectRatio
SVGAnimatedRect
SVGAnimatedString
SVGAnimatedTransformList
SVGAnimationElement
SVGCircleElement
SVGClipPathElement
SVGComponentTransferFunctionElement
SVGCursorElement
SVGDefsElement
SVGDescElement
SVGDocument
SVGElement
SVGEllipseElement
SVGFEBlendElement
SVGFEColorMatrixElement
SVGFEComponentTransferElement
SVGFECompositeElement
SVGFEConvolveMatrixElement
SVGFEDiffuseLightingElement
SVGFEDisplacementMapElement
SVGFEDistantLightElement
SVGFEDropShadowElement
SVGFEFloodElement
SVGFEFuncAElement
SVGFEFuncBElement
SVGFEFuncGElement
SVGFEFuncRElement
SVGFEGaussianBlurElement
SVGFEImageElement
SVGFEMergeElement
SVGFEMergeNodeElement
SVGFEMorphologyElement
SVGFEOffsetElement
SVGFEPointLightElement
SVGFESpecularLightingElement
SVGFESpotLightElement
SVGFETileElement
SVGFETurbulenceElement
SVGFilterElement
SVGFilterPrimitiveStandardAttributes
SVGFitToViewBox
SVGFontElement
SVGFontFaceElement
SVGFontFaceFormatElement
SVGFontFaceNameElement
SVGFontFaceSrcElement
SVGFontFaceUriElement
SVGForeignObjectElement
SVGGElement
SVGGlyphElement
SVGGradientElement
SVGGraphicsElement
SVGHKernElement
SVGImageElement
SVGLength
SVGLengthList
SVGLineElement
SVGLinearGradientElement
SVGMPathElement
SVGMarkerElement
SVGMaskElement
SVGMatrix
SVGMetadataElement
SVGMissingGlyphElement
SVGNumber
SVGNumberList
SVGPathElement
SVGPathSeg
SVGPathSegArcAbs
SVGPathSegArcRel
SVGPathSegClosePath
SVGPathSegCurvetoCubicAbs
SVGPathSegCurvetoCubicRel
SVGPathSegCurvetoCubicSmoothAbs
SVGPathSegCurvetoCubicSmoothRel
SVGPathSegCurvetoQuadraticAbs
SVGPathSegCurvetoQuadraticRel
SVGPathSegCurvetoQuadraticSmoothAbs
SVGPathSegCurvetoQuadraticSmoothRel
SVGPathSegLinetoAbs
SVGPathSegLinetoHorizontalAbs
SVGPathSegLinetoHorizontalRel
SVGPathSegLinetoRel
SVGPathSegLinetoVerticalAbs
SVGPathSegLinetoVerticalRel
SVGPathSegList
SVGPathSegMovetoAbs
SVGPathSegMovetoRel
SVGPatternElement
SVGPoint
SVGPointList
SVGPolygonElement
SVGPolylineElement
SVGPreserveAspectRatio
SVGRadialGradientElement
SVGRect
SVGRectElement
SVGSVGElement
SVGScriptElement
SVGSetElement
SVGStopElement
SVGStylable
SVGStyleElement
SVGSwitchElement
SVGSymbolElement
SVGTRefElement
SVGTSpanElement
SVGTests
SVGTextContentElement
SVGTextElement
SVGTextPathElement
SVGTextPositioningElement
SVGTitleElement
SVGTransform
SVGTransformList
SVGTransformable
SVGURIReference
SVGUnitTypes
SVGUseElement
SVGVKernElement
SVGViewElement
SVGZoomAndPan
SVGZoomEvent
TimeEvent