webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Instance Methods | List of all members
WebTextIterator Class Reference

#import <WebTextIterator.h>

Inheritance diagram for WebTextIterator:
NSObject

Instance Methods

(id- initWithRange:
 
(void- advance
 
(BOOL- atEnd
 
(NSUInteger) - currentTextLength
 
(const unichar *) - currentTextPointer
 
(DOMRange *) - currentRange
 
(DOMNode *) - currentNode
 
(NSString *) - currentText
 

Method Documentation

◆ advance()

- (void) advance

advance Moves the WebTextIterator to the next bit of text or boundary between runs of text. The iterator can break up runs of text however it finds convenient, so clients need to handle text runs that are broken up into arbitrary pieces.

◆ atEnd()

- (BOOL) atEnd

atEnd

Returns
YES if the WebTextIterator has reached the end of the DOMRange.

◆ currentNode()

- (DOMNode *) currentNode

currentNode A convenience method that finds the first node in currentRange; it's almost always better to use currentRange instead.

Returns
The current DOMNode in the WebTextIterator

Provided by category WebTextIterator(WebTextIteratorDeprecated).

◆ currentRange()

- (DOMRange *) currentRange

currentRange A function that identifies the specific document range that text corresponds to. This can be quite costly to compute for non-text items, so when possible this should only be called once the caller has determined that the text is text it wants to process. If you call currentRange every time you advance the iterator, performance will be extremely slow due to the cost of computing a DOM range.

Returns
A DOM range indicating the position within the document of the current text.

◆ currentText()

- (NSString *) currentText

currentText A convenience method that makes an NSString out of the current text; it's almost always better to use currentTextPointer and currentTextLength instead.

Returns
The current text in the WebTextIterator.

Provided by category WebTextIterator(WebTextIteratorDeprecated).

◆ currentTextLength()

- (NSUInteger) currentTextLength

currentTextLength

Returns
Length of the current text. Length of zero means that the iterator is at a boundary, such as an image, that separates runs of text.

◆ currentTextPointer()

- (const unichar *) currentTextPointer

currentTextPointer

Returns
A pointer to the current text. Like the WebTextIterator itself, the pointer becomes invalid after any modification is made to the document; it must be used before the document is changed or the iterator is advanced.

◆ initWithRange:()

- (id) initWithRange: (DOMRange *)  range

The documentation for this class was generated from the following files: