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:
iska
2016-11-20 18:36:55 +01:00
parent 46072a09cc
commit 2fb871a7ff
5 changed files with 37 additions and 0 deletions
+5
View File
@@ -35,6 +35,11 @@
self.data = textContent ?: @"";
}
- (NSUInteger)length
{
return self.data.length;
}
#pragma mark - NSCopying
- (id)copyWithZone:(NSZone *)zone