From 858f19e9f8b9ba26eee8d3aeb8ba8b5b5058472b Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Sat, 24 Nov 2018 11:17:13 +0100 Subject: Get rid of HTMLNode and Bare in favor of Dom - words() and element() added to Dom - svg() now returns the _parent_ of the imported element, when outerHTML is true (which means an element gets replaces) --- src/elements/Style.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/elements/Style.js') diff --git a/src/elements/Style.js b/src/elements/Style.js index 50ec50e..0b1cdb7 100644 --- a/src/elements/Style.js +++ b/src/elements/Style.js @@ -23,8 +23,8 @@ export default class Style extends Element { super(nodeOrNew('style', node), node) } - words (w) { - this.node.textContent += (w || '') + addText (w = '') { + this.node.textContent += w return this } @@ -37,7 +37,7 @@ export default class Style extends Element { } rule (selector, obj) { - return this.words(cssRule(selector, obj)) + return this.addText(cssRule(selector, obj)) } } -- cgit v1.2.3