@htmltools/hdom 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/hdom.d.ts CHANGED
@@ -11,6 +11,11 @@ export class hdom {
11
11
  * @returns {Element}
12
12
  */
13
13
  static addEventListener(e: string | Element, type: string, fn: (arg0: Event) => void): Element;
14
+ /**
15
+ * @param {Element} parent
16
+ * @param {string} str
17
+ */
18
+ static appendTextValue(parent: Element, str: string): void;
14
19
  /**
15
20
  * @param {string|HTMLElement} e
16
21
  */
package/lib/hdom.js CHANGED
@@ -22,6 +22,14 @@ export class hdom {
22
22
  return elem;
23
23
  }
24
24
 
25
+ /**
26
+ * @param {Element} parent
27
+ * @param {string} str
28
+ */
29
+ static appendTextValue(parent, str) {
30
+ parent.appendChild(document.createTextNode(str));
31
+ }
32
+
25
33
  /**
26
34
  * @param {string|HTMLElement} e
27
35
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmltools/hdom",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Tools to interact with the HTML DOM.",
5
5
  "license": "MIT",
6
6
  "repository": {