aboutsummaryrefslogtreecommitdiffstats
path: root/src/HtmlNode.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/HtmlNode.js')
-rw-r--r--src/HtmlNode.js34
1 files changed, 4 insertions, 30 deletions
diff --git a/src/HtmlNode.js b/src/HtmlNode.js
index 258c0ec..ff45984 100644
--- a/src/HtmlNode.js
+++ b/src/HtmlNode.js
@@ -1,35 +1,9 @@
-import {makeInstance} from './adopter.js'
-import Parent from './Parent.js'
+import Dom from './Dom.js'
import {register} from './adopter.js'
-export default class HtmlNode extends Parent {
- constructor (element) {
- super(element, HtmlNode)
- this.node = element
- }
-
- add (element, i) {
- element = makeInstance(element)
-
- if (element.node !== this.node.children[i]) {
- this.node.insertBefore(element.node, this.node.children[i] || null)
- }
-
- return this
- }
-
- put (element, i) {
- this.add(element, i)
- return element
- }
-
- removeElement (element) {
- this.node.removeChild(element.node)
- return this
- }
-
- getEventTarget () {
- return this.node
+export default class HtmlNode extends Dom {
+ constructor (node) {
+ super(node, HtmlNode)
}
}