AvailabilityDOM Level 1 Core SynopsisString substringData(unsigned long offset, unsigned long count) throws DOMException; Arguments
ReturnsA string that consists of count characters of the Text or Comment node starting with the character at position offset. ThrowsThis method may throw a DOMException with one of the following code values:
DescriptionThis method extracts the substring that starts at position offset and continues for count characters from the text of a Text or Comment node. This method is useful only when the amount of text contained by the node is larger than the maximum number of characters that can fit in a string in a browser's JavaScript implementation. In this case, a JavaScript program cannot use the data property of the Text or Comment node directly and must instead work with shorter substrings of the node's text. This situation is unlikely to arise in practice. |