Comparing version 0.1.8 to 0.1.9
@@ -22,5 +22,4 @@ 'use strict'; | ||
getElementById(id) { | ||
return this.children.find( | ||
_next => NonElementParentNode.getElementById({_next}, id) | ||
); | ||
const {_next, _end} = this; | ||
return _next === _end ? null : NonElementParentNode.getElementById(this, id); | ||
} | ||
@@ -76,3 +75,7 @@ // </NonElementParentNode> | ||
// </ParentNode> | ||
toString() { | ||
return this.childNodes.join(''); | ||
} | ||
} | ||
exports.DocumentFragment = DocumentFragment |
@@ -21,5 +21,4 @@ import {DOCUMENT_FRAGMENT_NODE} from './constants.js'; | ||
getElementById(id) { | ||
return this.children.find( | ||
_next => NonElementParentNode.getElementById({_next}, id) | ||
); | ||
const {_next, _end} = this; | ||
return _next === _end ? null : NonElementParentNode.getElementById(this, id); | ||
} | ||
@@ -75,2 +74,6 @@ // </NonElementParentNode> | ||
// </ParentNode> | ||
toString() { | ||
return this.childNodes.join(''); | ||
} | ||
} |
{ | ||
"name": "linkedom", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "A triple-linked lists based DOM", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
@@ -14,2 +14,4 @@ # 🔗 linkedom | ||
## Work in progress | ||
@@ -52,2 +54,19 @@ | ||
## Parsing VS Node Types | ||
This module parses, and works, only with the following `nodeType`: | ||
* `ELEMENT_NODE` | ||
* `ATTRIBUTE_NODE` | ||
* `TEXT_NODE` | ||
* `COMMENT_NODE` | ||
* `DOCUMENT_NODE` | ||
* `DOCUMENT_FRAGMENT_NODE` | ||
Everything else, at least for the time being, is considered *YAGNI*, and it won't likely ever land in this project, as there's no goal to replicate deprecated features of this aged Web. | ||
## Benchmarks | ||
@@ -54,0 +73,0 @@ |
102609
3419
85
3
141956