selectSubString method

Selects the specified substring, just as if a user selected the substring interactively.

Scalable Vector Graphics: Text, Section 10.17.1Internet Explorer 9

 

Syntax

object.selectSubString(charnum, nchars)

Parameters

charnum [in]

Type: Integer

The index of the start character in the substring, where the first character has an index of 0.

nchars [in]

Type: Integer

The number of characters in the substring. If the nchars parameter specifies more characters than are available, the substring consists of all characters starting with the charnum character until the end of the list of characters.

Return value

Type: HRESULT

This method can return one of these values.

Return codeDescription
W3CException_DOM_INDEX_SIZE_ERR

IE9 mode only.

Index or size is negative, or greater than the allowed value.

 

Exceptions

ExceptionCondition
IndexSizeError

Index or size is negative, or greater than the allowed value. For versions earlier than Internet Explorer 10, INDEX_SIZE_ERR is returned.

 

Standards information

Remarks

The selectSubString method can raise a DOMException excpetion with the code INDEX_SIZE_ERR. This exception is raised if the charnum or nchars parameter is negative or if charnum is greater than or equal to the number of characters at this node.

See also

SVGTextElement
SVGTextPathElement
SVGTextPositioningElement
SVGTSpanElement
ISVGTextContentElement

 

 

Show: