1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1x 1x 2x 1x 44x 1x 44x 44x 44x | import { startSeparator, endSeparator } from './patterns.js'; export class ContentNode { constructor(node, index) { this.node = node; this.index = index; } IEE cleanUp() { this.node.textContent = this.node.textContent.replace(startSeparator, '').replace(endSeparator, ''); } I update(newNode) { if (this.node.nodeValue !== newNode.node.nodeValue) { this.node.nodeValue = newNode.node.nodeValue; } } } |