Add implementation for the length property for HTML Nodes
See: https://dom.spec.whatwg.org/#concept-node-length https://heycam.github.io/webidl/#dfn-code-unit
This commit is contained in:
@@ -137,6 +137,11 @@ typedef NS_ENUM(unsigned short, HTMLDocumentPosition)
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *innerHTML;
|
||||
|
||||
/**
|
||||
The length of the node as described in https://dom.spec.whatwg.org/#concept-node-length
|
||||
*/
|
||||
@property (nonatomic, assign) NSUInteger length;
|
||||
|
||||
/**
|
||||
@abstract Use concrete subclasses of the HTML Node.
|
||||
*/
|
||||
@@ -164,6 +169,13 @@ typedef NS_ENUM(unsigned short, HTMLDocumentPosition)
|
||||
*/
|
||||
- (NSUInteger)childNodesCount;
|
||||
|
||||
/**
|
||||
Checks whether the node is empty as described in https://dom.spec.whatwg.org/#concept-node-length
|
||||
|
||||
@return `YES` if the node is empty, `NO` otherwise.
|
||||
*/
|
||||
- (BOOL)isEmpty;
|
||||
|
||||
/**
|
||||
Returns the child node at a given index.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user