Comparing version 0.1.39 to 0.1.40
@@ -32,3 +32,3 @@ 'use strict'; | ||
/* c8 ignore start */ | ||
/* TODO: this is more complicated than it looks | ||
setStart(node, offset) { | ||
@@ -41,3 +41,17 @@ this._start = node.childNodes[offset]; | ||
} | ||
*/ | ||
insertNode(newNode) { | ||
this._start.parentNode.insertBefore(newNode, this._start); | ||
} | ||
selectNode(node) { | ||
this._start = node; | ||
this._end = getEnd(node); | ||
} | ||
surroundContents(parentNode) { | ||
parentNode.replaceChildren(this.extractContents()); | ||
} | ||
setStartBefore(node) { | ||
@@ -58,3 +72,2 @@ this._start = node; | ||
} | ||
/* c8 ignore stop */ | ||
@@ -61,0 +74,0 @@ cloneContents() { |
@@ -31,3 +31,3 @@ import {getEnd, setAdjacent} from './utils.js'; | ||
/* c8 ignore start */ | ||
/* TODO: this is more complicated than it looks | ||
setStart(node, offset) { | ||
@@ -40,3 +40,17 @@ this._start = node.childNodes[offset]; | ||
} | ||
*/ | ||
insertNode(newNode) { | ||
this._start.parentNode.insertBefore(newNode, this._start); | ||
} | ||
selectNode(node) { | ||
this._start = node; | ||
this._end = getEnd(node); | ||
} | ||
surroundContents(parentNode) { | ||
parentNode.replaceChildren(this.extractContents()); | ||
} | ||
setStartBefore(node) { | ||
@@ -57,3 +71,2 @@ this._start = node; | ||
} | ||
/* c8 ignore stop */ | ||
@@ -60,0 +73,0 @@ cloneContents() { |
{ | ||
"name": "linkedom", | ||
"version": "0.1.39", | ||
"version": "0.1.40", | ||
"description": "A triple-linked lists based DOM implementation", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
1590889
7107