pseudo-dom 0.7.0 → 0.9.0

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.
Files changed (57) hide show
  1. package/README.md +468 -237
  2. package/browser/pseudo-dom.js +986 -563
  3. package/browser/pseudo-dom.min.js +1 -1
  4. package/dist/classes/PseudoHTMLDocument.d.ts +17 -43
  5. package/dist/classes/PseudoHTMLDocument.js +24 -94
  6. package/dist/classes/PseudoHTMLDocument.min.js +1 -1
  7. package/dist/factories/createDataset.d.ts +10 -0
  8. package/dist/factories/createDataset.js +78 -0
  9. package/dist/factories/createDataset.min.js +1 -0
  10. package/dist/factories/createStyleDeclaration.d.ts +30 -0
  11. package/dist/factories/createStyleDeclaration.js +64 -0
  12. package/dist/factories/createStyleDeclaration.min.js +1 -0
  13. package/dist/factories/cssSelectAdapter.d.ts +23 -23
  14. package/dist/factories/cssSelectAdapter.js +87 -87
  15. package/dist/factories/query.d.ts +33 -33
  16. package/dist/factories/query.js +66 -66
  17. package/dist/functions/getElementById.d.ts +13 -0
  18. package/dist/functions/getElementById.js +33 -0
  19. package/dist/functions/getElementById.min.js +1 -0
  20. package/dist/interfaces/PseudoCSSStyleDeclaration.d.ts +14 -0
  21. package/dist/interfaces/PseudoCSSStyleDeclaration.js +5 -0
  22. package/dist/interfaces/PseudoCSSStyleDeclaration.min.js +1 -0
  23. package/dist/interfaces/PseudoDocument.d.ts +35 -10
  24. package/dist/interfaces/PseudoDocumentFragment.d.ts +7 -0
  25. package/dist/interfaces/PseudoElement.d.ts +702 -702
  26. package/dist/interfaces/PseudoHTMLElement.d.ts +33 -22
  27. package/dist/services/CSSStyleDeclarationService.d.ts +73 -0
  28. package/dist/services/CSSStyleDeclarationService.js +156 -0
  29. package/dist/services/CSSStyleDeclarationService.min.js +1 -0
  30. package/dist/services/DocumentFragmentService.d.ts +8 -0
  31. package/dist/services/DocumentFragmentService.js +18 -0
  32. package/dist/services/DocumentFragmentService.min.js +1 -1
  33. package/dist/services/DocumentService.d.ts +46 -19
  34. package/dist/services/DocumentService.js +95 -46
  35. package/dist/services/DocumentService.min.js +1 -1
  36. package/dist/services/ElementService.d.ts +191 -191
  37. package/dist/services/ElementService.js +426 -426
  38. package/dist/services/HTMLCollectionService.d.ts +54 -54
  39. package/dist/services/HTMLCollectionService.js +92 -92
  40. package/dist/services/HTMLElementService.d.ts +87 -57
  41. package/dist/services/HTMLElementService.js +202 -163
  42. package/dist/services/HTMLElementService.min.js +1 -1
  43. package/dist/services/NodeService.d.ts +297 -297
  44. package/dist/services/NodeService.js +721 -721
  45. package/package.json +2 -2
  46. package/dist/classes.d.ts +0 -20
  47. package/dist/classes.js +0 -31
  48. package/dist/classes.min.js +0 -1
  49. package/dist/factories/generateNode.d.ts +0 -32
  50. package/dist/factories/generateNode.js +0 -85
  51. package/dist/factories/generateNode.min.js +0 -1
  52. package/dist/factories.d.ts +0 -11
  53. package/dist/factories.js +0 -27
  54. package/dist/factories.min.js +0 -1
  55. package/dist/functions.d.ts +0 -5
  56. package/dist/functions.js +0 -23
  57. package/dist/functions.min.js +0 -1
package/README.md CHANGED
@@ -18,6 +18,13 @@ else, document fragments insert their children, and a node cannot be put inside
18
18
  `DOMTokenListService`, `NamedNodeMapService`, `DocumentService` / `DocumentFragmentService`, `PseudoNodeList`, and
19
19
  `generateDocument` for creating a document.
20
20
 
21
+ `style` is a real, live `CSSStyleDeclaration`: named property access (\`el.style.backgroundColor = 'red'\`) alongside
22
+ \`getPropertyValue\` / \`setProperty\` / \`removeProperty\` / \`getPropertyPriority\` / \`cssText\`; an unset property
23
+ reads as \`''\`, like the DOM's. \`dataset\` is a live `DOMStringMap`: reading/writing/deleting a camelCase name
24
+ (\`el.dataset.fooBar\`) reads/writes/removes the matching \`data-foo-bar\` attribute directly, so it can never fall out
25
+ of sync with the attributes themselves. Both are on \`HTMLElementService\`, matching the DOM (they are not on the base
26
+ Element).
27
+
21
28
  Standard events: `createEvent(type, init, { browser, trusted })` makes the kind of event which suits the type (a click is a
22
29
  `MouseEvent`, a keydown a `KeyboardEvent`, ...). Like the constructor in a browser it gives nothing (no bubbling, no
23
30
  cancelling, not trusted) unless asked, but with `browser: true` it uses `eventDefaults`, the table of how the browser
@@ -49,8 +56,14 @@ Selector queries work like the DOM's: \`getElementsByTagName\` / \`getElementsBy
49
56
  \`querySelector\` / \`querySelectorAll\` (real CSS selectors, via [css-select](https://www.npmjs.com/package/css-select)
50
57
  matched against pseudo-dom's own tree through a custom adapter - \`querySelectorAll\` is a plain array, a snapshot
51
58
  taken when it is called, like the DOM's) are on \`NodeService\` so \`Document\`, \`DocumentFragment\` and \`Element\`
52
- all have them; \`matches\` / \`closest\` are on \`ElementService\`; \`getElementById\` is on \`DocumentService\` only,
53
- matching the real DOM.
59
+ all have them; \`matches\` / \`closest\` are on \`ElementService\`; \`getElementById\` is on both \`DocumentService\`
60
+ and \`DocumentFragmentService\` (the DOM's \`NonElementParentNode\` mixin, so a \`ShadowRoot\` gets it too), matching
61
+ the real DOM.
62
+
63
+ \`DocumentService\` matches the real \`Document\` (it is not an \`Element\`, so it has no \`tagName\` / \`classList\` /
64
+ \`matches\` / etc.): \`createElement\`, \`createTextNode\`, \`createComment\`, \`createDocumentFragment\`,
65
+ \`getElementById\`, and \`textContent\` always \`null\`. \`PseudoHTMLDocument\` (what \`generateDocument\` actually
66
+ creates) only adds the \`html\` / \`head\` / \`body\` structure on top.
54
67
 
55
68
  Not implemented yet (these throw a "not implemented" error or are missing): \`getElementsByTagNameNS\`, \`innerHTML\` /
56
69
  \`outerHTML\` parsing, and most of the rest of the Element and Document APIs. The API will change before 1.0.
@@ -131,19 +144,24 @@ not part of a tree, when it is inserted its children are moved into the tree ins
131
144
  <dt><a href="#CustomEventService">CustomEventService</a> ⇐ <code><a href="#EventService">EventService</a></code></dt>
132
145
  <dd><p>Simulate the behaviour of the CustomEvent Class when there is no DOM available: an event which carries data.</p>
133
146
  </dd>
147
+ <dt><a href="#CSSStyleDeclarationService">CSSStyleDeclarationService</a></dt>
148
+ <dd><p>Simulate the behaviour of the CSSStyleDeclaration Class when there is no DOM available: an ordered map of CSS
149
+ property/value pairs, parsed from and serialized back to a cssText string. Values are stored and returned as
150
+ given, with no unit conversion, shorthand expansion or validation - this is a data structure, not a real CSS
151
+ engine. Named property access (declaration.backgroundColor, camelCase) is added on top of this by
152
+ createStyleDeclaration, which wraps an instance of this class in a Proxy.</p>
153
+ </dd>
134
154
  <dt><a href="#AttrService">AttrService</a> ⇐ <code><a href="#NodeService">NodeService</a></code></dt>
135
155
  <dd><p>Simulate the behaviour of the Attr Class when there is no DOM available.</p>
136
156
  </dd>
137
- <dt><a href="#LinkedNode">LinkedNode</a> ⇐ <code><a href="#NodeService">NodeService</a></code></dt>
138
- <dd><p>A node which is stored in a TreeLinker (for example by a list built from an array of values). It finds its siblings
139
- from that linker, and its parent from the linker&#39;s parent when it has not been given one by appendChild.</p>
140
- </dd>
141
157
  <dt><a href="#PseudoNodeList">PseudoNodeList</a> ⇐ <code>LinkedTreeList</code></dt>
142
158
  <dd><p>A NodeList, like the DOM one, iterates over the nodes themselves (the data stored in each TreeLinker), rather than
143
159
  the linkers that hold them.</p>
144
160
  </dd>
145
- <dt><a href="#PseudoHTMLDocument">PseudoHTMLDocument</a> ⇐ <code>PseudoHTMLElement</code></dt>
146
- <dd><p>Simulate the behaviour of the HTMLDocument Class when there is no DOM available.</p>
161
+ <dt><a href="#PseudoHTMLDocument">PseudoHTMLDocument</a> ⇐ <code><a href="#DocumentService">DocumentService</a></code></dt>
162
+ <dd><p>Simulate the behaviour of the HTMLDocument Class when there is no DOM available. Like the real HTMLDocument, this
163
+ only adds the html/head/body structure on top of what Document already gives (createElement, createTextNode,
164
+ createComment, createDocumentFragment, getElementById, textContent always null).</p>
147
165
  </dd>
148
166
  <dt><a href="#PseudoEventListener">PseudoEventListener</a></dt>
149
167
  <dd><p>Handle events as they are stored and implemented.</p>
@@ -167,8 +185,6 @@ The values follow the UI Events, HTML, Pointer Events, Clipboard, Drag and Drop,
167
185
  <dt><a href="#focused">focused</a></dt>
168
186
  <dd><p>The element which has the focus, kept for each tree (the root node of the tree it is in), like document.activeElement.</p>
169
187
  </dd>
170
- <dt><a href="#HTMLElementService_1">HTMLElementService_1</a> : <code>PseudoHTMLElement</code></dt>
171
- <dd></dd>
172
188
  </dl>
173
189
 
174
190
  ## Functions
@@ -198,10 +214,6 @@ order in which an event travels down through them). A node which has no parent h
198
214
  <dt><a href="#generateNodeList">generateNodeList([innerList])</a> ⇒ <code><a href="#PseudoNodeList">PseudoNodeList</a></code></dt>
199
215
  <dd><p>Create a PseudoNodeList, optionally starting from an existing chain of linkers.</p>
200
216
  </dd>
201
- <dt><a href="#generateNode">generateNode()</a> ⇒ <code>function</code></dt>
202
- <dd><p>Create a TreeLinker class whose linkers each store a node (a LinkedNode) as their data, this can be used to build a
203
- tree (or list) of nodes from plain values.</p>
204
- </dd>
205
217
  <dt><a href="#generateDocument">generateDocument(root, context)</a> ⇒ <code>Window</code> | <code>PseudoEventTarget</code></dt>
206
218
  <dd><p>Construct the Pseudo Dom to provide access to Dom objects which are otherwise not available outside the browser
207
219
  context.</p>
@@ -209,6 +221,12 @@ context.</p>
209
221
  <dt><a href="#nearestElementSibling">nearestElementSibling(node, direction)</a> ⇒ <code>*</code> | <code>null</code></dt>
210
222
  <dd><p>Walk up from a node (not including it) to find the nearest element, in the given direction.</p>
211
223
  </dd>
224
+ <dt><a href="#kebabToCamel">kebabToCamel(name)</a> ⇒ <code>string</code></dt>
225
+ <dd><p>kebab-case -&gt; camelCase (&quot;background-color&quot; -&gt; &quot;backgroundColor&quot;).</p>
226
+ </dd>
227
+ <dt><a href="#camelToKebab">camelToKebab(name)</a> ⇒ <code>string</code></dt>
228
+ <dd><p>camelCase -&gt; kebab-case (&quot;backgroundColor&quot; -&gt; &quot;background-color&quot;).</p>
229
+ </dd>
212
230
  <dt><a href="#createEvent">createEvent(type, [init], [options])</a> ⇒ <code><a href="#EventService">EventService</a></code></dt>
213
231
  <dd><p>Create an event of the kind which suits its type (a click is a MouseEvent, a keydown a KeyboardEvent, ...).
214
232
  By default this is like using the constructor of the event in a script: nothing bubbles or can be cancelled unless
@@ -216,6 +234,9 @@ the init says so, and the event is not trusted. With browser: true the event is
216
234
  it, using the standard options for its type (see eventDefaults), and trusted: true makes it look like it came from a
217
235
  real user action (isTrusted).</p>
218
236
  </dd>
237
+ <dt><a href="#dataAttributes">dataAttributes(element)</a> ⇒ <code>Array.&lt;Array.&lt;string&gt;&gt;</code></dt>
238
+ <dd><p>Every data-* attribute name currently on the element, as [attributeName, camelCaseName] pairs.</p>
239
+ </dd>
219
240
  </dl>
220
241
 
221
242
  <a name="module_pseudoDom/simulate"></a>
@@ -1825,13 +1846,18 @@ Simulate the behaviour of the HTMLElement Class when there is no DOM available.
1825
1846
  | offsetParent | <code>PseudoHTMLElement</code> | A reference to the closest positioned parent element |
1826
1847
  | offsetTop | <code>number</code> | The position of the top side of the element based on the parent element |
1827
1848
  | offsetWidth | <code>number</code> | The width of the element as offset by the parent element |
1828
- | style | <code>Object</code> | A container to define all applied inline-styles |
1849
+ | style | [<code>CSSStyleDeclarationService</code>](#CSSStyleDeclarationService) | The element's inline styles, live and settable per property |
1850
+ | dataset | <code>Object.&lt;string, string&gt;</code> | The element's data-* attributes, live, under their camelCase names |
1829
1851
  | title | <code>string</code> | The title attribute which affects the text visible on hover |
1830
1852
 
1831
1853
 
1832
1854
  * [HTMLElementService](#HTMLElementService) ⇐ <code>PseudoElement</code>
1833
1855
  * [new HTMLElementService([elementOptions])](#new_HTMLElementService_new)
1856
+ * [.style](#HTMLElementService+style) ⇒ [<code>CSSStyleDeclarationService</code>](#CSSStyleDeclarationService)
1857
+ * [.dataset](#HTMLElementService+dataset) ⇒ <code>Object.&lt;string, string&gt;</code>
1834
1858
  * [.canFocus](#HTMLElementService+canFocus) ⇒ <code>boolean</code>
1859
+ * [.cloneShallow()](#HTMLElementService+cloneShallow) ⇒ [<code>NodeService</code>](#NodeService)
1860
+ * [.equalsShallow(other)](#HTMLElementService+equalsShallow) ⇒ <code>boolean</code>
1835
1861
  * [.click()](#HTMLElementService+click)
1836
1862
  * [.focus()](#HTMLElementService+focus)
1837
1863
  * [.blur()](#HTMLElementService+blur)
@@ -1849,12 +1875,43 @@ Simulate the HTMLElement object when the Dom is not available
1849
1875
  | [elementOptions.parent] | <code>PseudoNode</code> \| <code>Object</code> | <code>{}</code> |
1850
1876
  | [elementOptions.children] | <code>Array</code> | <code>[]</code> |
1851
1877
 
1878
+ <a name="HTMLElementService+style"></a>
1879
+
1880
+ ### htmlElementService.style ⇒ [<code>CSSStyleDeclarationService</code>](#CSSStyleDeclarationService)
1881
+ The element's inline styles: a live CSSStyleDeclaration-like object, so both style.setProperty('color', 'red')
1882
+ and style.color = 'red' work.
1883
+
1884
+ **Kind**: instance property of [<code>HTMLElementService</code>](#HTMLElementService)
1885
+ <a name="HTMLElementService+dataset"></a>
1886
+
1887
+ ### htmlElementService.dataset ⇒ <code>Object.&lt;string, string&gt;</code>
1888
+ The element's data-* attributes, live, under their camelCase names (data-foo-bar <-> dataset.fooBar). Backed
1889
+ directly by getAttribute / setAttribute, so it is never out of sync with the attributes themselves.
1890
+
1891
+ **Kind**: instance property of [<code>HTMLElementService</code>](#HTMLElementService)
1852
1892
  <a name="HTMLElementService+canFocus"></a>
1853
1893
 
1854
1894
  ### htmlElementService.canFocus ⇒ <code>boolean</code>
1855
1895
  Whether this element can have the focus: form controls and links which are not disabled, and anything with a tabindex.
1856
1896
 
1857
1897
  **Kind**: instance property of [<code>HTMLElementService</code>](#HTMLElementService)
1898
+ <a name="HTMLElementService+cloneShallow"></a>
1899
+
1900
+ ### htmlElementService.cloneShallow() ⇒ [<code>NodeService</code>](#NodeService)
1901
+ Style is not attribute-backed like most properties (see the constructor), so cloneNode needs its own copy of it.
1902
+
1903
+ **Kind**: instance method of [<code>HTMLElementService</code>](#HTMLElementService)
1904
+ <a name="HTMLElementService+equalsShallow"></a>
1905
+
1906
+ ### htmlElementService.equalsShallow(other) ⇒ <code>boolean</code>
1907
+ Style is not attribute-backed like most properties, so isEqualNode needs to compare it separately too.
1908
+
1909
+ **Kind**: instance method of [<code>HTMLElementService</code>](#HTMLElementService)
1910
+
1911
+ | Param | Type | Description |
1912
+ | --- | --- | --- |
1913
+ | other | [<code>NodeService</code>](#NodeService) | The node to compare with |
1914
+
1858
1915
  <a name="HTMLElementService+click"></a>
1859
1916
 
1860
1917
  ### htmlElementService.click()
@@ -2493,6 +2550,10 @@ Simulate the behaviour of the Document Class when there is no DOM available.
2493
2550
  * [DocumentService](#DocumentService) ⇐ [<code>NodeService</code>](#NodeService)
2494
2551
  * [.acceptsChildren](#NodeService+acceptsChildren) ⇒ <code>boolean</code>
2495
2552
  * [.getElementById(id)](#DocumentService+getElementById) ⇒ <code>PseudoElement</code> \| <code>null</code>
2553
+ * [.createElement([tagName])](#DocumentService+createElement) ⇒ <code>PseudoElement</code>
2554
+ * [.createTextNode([data])](#DocumentService+createTextNode) ⇒ [<code>TextService</code>](#TextService)
2555
+ * [.createComment([data])](#DocumentService+createComment) ⇒ [<code>CommentService</code>](#CommentService)
2556
+ * [.createDocumentFragment()](#DocumentService+createDocumentFragment) ⇒ [<code>DocumentFragmentService</code>](#DocumentFragmentService)
2496
2557
  * [.appendChild(childNode)](#NodeService+appendChild) ⇒ <code>PseudoNode</code>
2497
2558
  * [.cloneShallow()](#NodeService+cloneShallow) ⇒ [<code>NodeService</code>](#NodeService)
2498
2559
  * [.equalsShallow(other)](#NodeService+equalsShallow) ⇒ <code>boolean</code>
@@ -2535,6 +2596,46 @@ The first element, in tree order, whose id matches the given value, or null when
2535
2596
  | --- | --- |
2536
2597
  | id | <code>string</code> |
2537
2598
 
2599
+ <a name="DocumentService+createElement"></a>
2600
+
2601
+ ### documentService.createElement([tagName]) ⇒ <code>PseudoElement</code>
2602
+ Make an element of the given type which belongs to this document but is not added anywhere until it is appended.
2603
+
2604
+ **Kind**: instance method of [<code>DocumentService</code>](#DocumentService)
2605
+
2606
+ | Param | Type | Default | Description |
2607
+ | --- | --- | --- | --- |
2608
+ | [tagName] | <code>string</code> | <code>&quot;&#x27;div&#x27;&quot;</code> | The type of element to create |
2609
+
2610
+ <a name="DocumentService+createTextNode"></a>
2611
+
2612
+ ### documentService.createTextNode([data]) ⇒ [<code>TextService</code>](#TextService)
2613
+ Make a text node which belongs to this document.
2614
+
2615
+ **Kind**: instance method of [<code>DocumentService</code>](#DocumentService)
2616
+
2617
+ | Param | Type | Default | Description |
2618
+ | --- | --- | --- | --- |
2619
+ | [data] | <code>string</code> | <code>&quot;&#x27;&#x27;&quot;</code> | The text |
2620
+
2621
+ <a name="DocumentService+createComment"></a>
2622
+
2623
+ ### documentService.createComment([data]) ⇒ [<code>CommentService</code>](#CommentService)
2624
+ Make a comment which belongs to this document.
2625
+
2626
+ **Kind**: instance method of [<code>DocumentService</code>](#DocumentService)
2627
+
2628
+ | Param | Type | Default | Description |
2629
+ | --- | --- | --- | --- |
2630
+ | [data] | <code>string</code> | <code>&quot;&#x27;&#x27;&quot;</code> | The comment |
2631
+
2632
+ <a name="DocumentService+createDocumentFragment"></a>
2633
+
2634
+ ### documentService.createDocumentFragment() ⇒ [<code>DocumentFragmentService</code>](#DocumentFragmentService)
2635
+ Make an empty document fragment which belongs to this document, a container for nodes which can be built up and
2636
+ then inserted in one go.
2637
+
2638
+ **Kind**: instance method of [<code>DocumentService</code>](#DocumentService)
2538
2639
  <a name="NodeService+appendChild"></a>
2539
2640
 
2540
2641
  ### documentService.appendChild(childNode) ⇒ <code>PseudoNode</code>
@@ -2840,6 +2941,7 @@ not part of a tree, when it is inserted its children are moved into the tree ins
2840
2941
 
2841
2942
  * [DocumentFragmentService](#DocumentFragmentService) ⇐ [<code>NodeService</code>](#NodeService)
2842
2943
  * [.acceptsChildren](#NodeService+acceptsChildren) ⇒ <code>boolean</code>
2944
+ * [.getElementById(id)](#DocumentFragmentService+getElementById) ⇒ <code>PseudoElement</code> \| <code>null</code>
2843
2945
  * [.appendChild(childNode)](#NodeService+appendChild) ⇒ <code>PseudoNode</code>
2844
2946
  * [.cloneShallow()](#NodeService+cloneShallow) ⇒ [<code>NodeService</code>](#NodeService)
2845
2947
  * [.equalsShallow(other)](#NodeService+equalsShallow) ⇒ <code>boolean</code>
@@ -2871,6 +2973,18 @@ not part of a tree, when it is inserted its children are moved into the tree ins
2871
2973
  Whether this kind of node can have children (text, comments and attributes cannot).
2872
2974
 
2873
2975
  **Kind**: instance property of [<code>DocumentFragmentService</code>](#DocumentFragmentService)
2976
+ <a name="DocumentFragmentService+getElementById"></a>
2977
+
2978
+ ### documentFragmentService.getElementById(id) ⇒ <code>PseudoElement</code> \| <code>null</code>
2979
+ The first element, in tree order, whose id matches the given value, or null when there is none (the DOM's
2980
+ NonElementParentNode mixin, which Document and DocumentFragment both implement).
2981
+
2982
+ **Kind**: instance method of [<code>DocumentFragmentService</code>](#DocumentFragmentService)
2983
+
2984
+ | Param | Type |
2985
+ | --- | --- |
2986
+ | id | <code>string</code> |
2987
+
2874
2988
  <a name="NodeService+appendChild"></a>
2875
2989
 
2876
2990
  ### documentFragmentService.appendChild(childNode) ⇒ <code>PseudoNode</code>
@@ -3249,6 +3363,119 @@ Stops the propagation of events further along in the Dom.
3249
3363
 
3250
3364
  **Kind**: instance method of [<code>CustomEventService</code>](#CustomEventService)
3251
3365
  **Overrides**: [<code>stopPropagation</code>](#EventService+stopPropagation)
3366
+ <a name="CSSStyleDeclarationService"></a>
3367
+
3368
+ ## CSSStyleDeclarationService
3369
+ Simulate the behaviour of the CSSStyleDeclaration Class when there is no DOM available: an ordered map of CSS
3370
+ property/value pairs, parsed from and serialized back to a cssText string. Values are stored and returned as
3371
+ given, with no unit conversion, shorthand expansion or validation - this is a data structure, not a real CSS
3372
+ engine. Named property access (declaration.backgroundColor, camelCase) is added on top of this by
3373
+ createStyleDeclaration, which wraps an instance of this class in a Proxy.
3374
+
3375
+ **Kind**: global class
3376
+ **Author**: Joshua Heagle <joshuaheagle@gmail.com>
3377
+
3378
+ * [CSSStyleDeclarationService](#CSSStyleDeclarationService)
3379
+ * [new CSSStyleDeclarationService([cssText])](#new_CSSStyleDeclarationService_new)
3380
+ * [.length](#CSSStyleDeclarationService+length) ⇒ <code>number</code>
3381
+ * [.cssText](#CSSStyleDeclarationService+cssText) ⇒ <code>string</code>
3382
+ * [.cssText](#CSSStyleDeclarationService+cssText) ⇒ <code>undefined</code>
3383
+ * [.item(index)](#CSSStyleDeclarationService+item) ⇒ <code>string</code>
3384
+ * [.getPropertyValue(property)](#CSSStyleDeclarationService+getPropertyValue) ⇒ <code>string</code>
3385
+ * [.getPropertyPriority(property)](#CSSStyleDeclarationService+getPropertyPriority) ⇒ <code>string</code>
3386
+ * [.setProperty(property, value, [priority])](#CSSStyleDeclarationService+setProperty) ⇒ <code>undefined</code>
3387
+ * [.removeProperty(property)](#CSSStyleDeclarationService+removeProperty) ⇒ <code>string</code>
3388
+
3389
+ <a name="new_CSSStyleDeclarationService_new"></a>
3390
+
3391
+ ### new CSSStyleDeclarationService([cssText])
3392
+
3393
+ | Param | Type | Default | Description |
3394
+ | --- | --- | --- | --- |
3395
+ | [cssText] | <code>string</code> | <code>&quot;&#x27;&#x27;&quot;</code> | Initial declarations, as CSS text ("color: red; font-size: 12px;") |
3396
+
3397
+ <a name="CSSStyleDeclarationService+length"></a>
3398
+
3399
+ ### cssStyleDeclarationService.length ⇒ <code>number</code>
3400
+ How many properties are currently set.
3401
+
3402
+ **Kind**: instance property of [<code>CSSStyleDeclarationService</code>](#CSSStyleDeclarationService)
3403
+ <a name="CSSStyleDeclarationService+cssText"></a>
3404
+
3405
+ ### cssStyleDeclarationService.cssText ⇒ <code>string</code>
3406
+ All the declarations as one CSS text string.
3407
+
3408
+ **Kind**: instance property of [<code>CSSStyleDeclarationService</code>](#CSSStyleDeclarationService)
3409
+ <a name="CSSStyleDeclarationService+cssText"></a>
3410
+
3411
+ ### cssStyleDeclarationService.cssText ⇒ <code>undefined</code>
3412
+ Replace every declaration by parsing a CSS text string ("color: red; font-size: 12px !important;").
3413
+
3414
+ **Kind**: instance property of [<code>CSSStyleDeclarationService</code>](#CSSStyleDeclarationService)
3415
+
3416
+ | Param | Type |
3417
+ | --- | --- |
3418
+ | cssText | <code>string</code> |
3419
+
3420
+ <a name="CSSStyleDeclarationService+item"></a>
3421
+
3422
+ ### cssStyleDeclarationService.item(index) ⇒ <code>string</code>
3423
+ The name of the property at the given index, in the order it was set, or '' when there is none (matches the
3424
+ DOM's CSSStyleDeclaration, which is array-like).
3425
+
3426
+ **Kind**: instance method of [<code>CSSStyleDeclarationService</code>](#CSSStyleDeclarationService)
3427
+
3428
+ | Param | Type |
3429
+ | --- | --- |
3430
+ | index | <code>number</code> |
3431
+
3432
+ <a name="CSSStyleDeclarationService+getPropertyValue"></a>
3433
+
3434
+ ### cssStyleDeclarationService.getPropertyValue(property) ⇒ <code>string</code>
3435
+ The value of the given property, or '' when it is not set.
3436
+
3437
+ **Kind**: instance method of [<code>CSSStyleDeclarationService</code>](#CSSStyleDeclarationService)
3438
+
3439
+ | Param | Type | Description |
3440
+ | --- | --- | --- |
3441
+ | property | <code>string</code> | A CSS property name (kebab-case, e.g. "background-color") |
3442
+
3443
+ <a name="CSSStyleDeclarationService+getPropertyPriority"></a>
3444
+
3445
+ ### cssStyleDeclarationService.getPropertyPriority(property) ⇒ <code>string</code>
3446
+ "important" when the property was set with !important, otherwise ''.
3447
+
3448
+ **Kind**: instance method of [<code>CSSStyleDeclarationService</code>](#CSSStyleDeclarationService)
3449
+
3450
+ | Param | Type | Description |
3451
+ | --- | --- | --- |
3452
+ | property | <code>string</code> | A CSS property name (kebab-case) |
3453
+
3454
+ <a name="CSSStyleDeclarationService+setProperty"></a>
3455
+
3456
+ ### cssStyleDeclarationService.setProperty(property, value, [priority]) ⇒ <code>undefined</code>
3457
+ Set a property's value (and optionally its priority). An empty, null or undefined value removes the property
3458
+ instead, like the DOM.
3459
+
3460
+ **Kind**: instance method of [<code>CSSStyleDeclarationService</code>](#CSSStyleDeclarationService)
3461
+
3462
+ | Param | Type | Default | Description |
3463
+ | --- | --- | --- | --- |
3464
+ | property | <code>string</code> | | A CSS property name (kebab-case) |
3465
+ | value | <code>string</code> | | The value, or '' to remove the property |
3466
+ | [priority] | <code>string</code> | <code>&quot;&#x27;&#x27;&quot;</code> | "important" to mark it !important |
3467
+
3468
+ <a name="CSSStyleDeclarationService+removeProperty"></a>
3469
+
3470
+ ### cssStyleDeclarationService.removeProperty(property) ⇒ <code>string</code>
3471
+ Remove a property, returning the value it had (or '' when it was not set).
3472
+
3473
+ **Kind**: instance method of [<code>CSSStyleDeclarationService</code>](#CSSStyleDeclarationService)
3474
+
3475
+ | Param | Type | Description |
3476
+ | --- | --- | --- |
3477
+ | property | <code>string</code> | A CSS property name (kebab-case) |
3478
+
3252
3479
  <a name="AttrService"></a>
3253
3480
 
3254
3481
  ## AttrService ⇐ [<code>NodeService</code>](#NodeService)
@@ -3622,21 +3849,69 @@ Replace a child of this node with another node (which is moved if it is already
3622
3849
  | newChild | <code>PseudoNode</code> | The node which takes the place |
3623
3850
  | oldChild | <code>PseudoNode</code> | The child of this node to replace |
3624
3851
 
3625
- <a name="LinkedNode"></a>
3852
+ <a name="PseudoNodeList"></a>
3626
3853
 
3627
- ## LinkedNode ⇐ [<code>NodeService</code>](#NodeService)
3628
- A node which is stored in a TreeLinker (for example by a list built from an array of values). It finds its siblings
3629
- from that linker, and its parent from the linker's parent when it has not been given one by appendChild.
3854
+ ## PseudoNodeList ⇐ <code>LinkedTreeList</code>
3855
+ A NodeList, like the DOM one, iterates over the nodes themselves (the data stored in each TreeLinker), rather than
3856
+ the linkers that hold them.
3630
3857
 
3631
3858
  **Kind**: global class
3632
- **Extends**: [<code>NodeService</code>](#NodeService)
3859
+ **Extends**: <code>LinkedTreeList</code>
3860
+
3861
+ * [PseudoNodeList](#PseudoNodeList) ⇐ <code>LinkedTreeList</code>
3862
+ * [.entries()](#PseudoNodeList+entries) ⇒ <code>Iterator</code>
3863
+ * [.keys()](#PseudoNodeList+keys) ⇒ <code>Iterator</code>
3864
+ * [.values()](#PseudoNodeList+values) ⇒ <code>Iterator</code>
3865
+
3866
+ <a name="PseudoNodeList+entries"></a>
3867
+
3868
+ ### pseudoNodeList.entries() ⇒ <code>Iterator</code>
3869
+ Iterate over [index, node] pairs.
3870
+
3871
+ **Kind**: instance method of [<code>PseudoNodeList</code>](#PseudoNodeList)
3872
+ <a name="PseudoNodeList+keys"></a>
3873
+
3874
+ ### pseudoNodeList.keys() ⇒ <code>Iterator</code>
3875
+ Iterate over the indexes.
3876
+
3877
+ **Kind**: instance method of [<code>PseudoNodeList</code>](#PseudoNodeList)
3878
+ <a name="PseudoNodeList+values"></a>
3879
+
3880
+ ### pseudoNodeList.values() ⇒ <code>Iterator</code>
3881
+ Iterate over the nodes.
3882
+
3883
+ **Kind**: instance method of [<code>PseudoNodeList</code>](#PseudoNodeList)
3884
+ <a name="PseudoHTMLDocument"></a>
3885
+
3886
+ ## PseudoHTMLDocument ⇐ [<code>DocumentService</code>](#DocumentService)
3887
+ Simulate the behaviour of the HTMLDocument Class when there is no DOM available. Like the real HTMLDocument, this
3888
+ only adds the html/head/body structure on top of what Document already gives (createElement, createTextNode,
3889
+ createComment, createDocumentFragment, getElementById, textContent always null).
3890
+
3891
+ **Kind**: global class
3892
+ **Extends**: [<code>DocumentService</code>](#DocumentService)
3633
3893
  **Author**: Joshua Heagle <joshuaheagle@gmail.com>
3894
+ **Properties**
3895
+
3896
+ | Name | Type | Description |
3897
+ | --- | --- | --- |
3898
+ | head | <code>PseudoHTMLElement</code> | A reference to the Head child element |
3899
+ | body | <code>PseudoHTMLElement</code> | A reference to the Body child element |
3634
3900
 
3635
- * [LinkedNode](#LinkedNode) ⇐ [<code>NodeService</code>](#NodeService)
3636
- * [new LinkedNode(linker, value)](#new_LinkedNode_new)
3901
+
3902
+ * [PseudoHTMLDocument](#PseudoHTMLDocument) ⇐ [<code>DocumentService</code>](#DocumentService)
3903
+ * [new PseudoHTMLDocument()](#new_PseudoHTMLDocument_new)
3904
+ * [.head](#PseudoHTMLDocument+head) : <code>PseudoHTMLElement</code>
3905
+ * [.body](#PseudoHTMLDocument+body) : <code>PseudoHTMLElement</code>
3637
3906
  * [.acceptsChildren](#NodeService+acceptsChildren) ⇒ <code>boolean</code>
3907
+ * [.cloneShallow()](#PseudoHTMLDocument+cloneShallow) ⇒ [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3908
+ * [.cloneNode([deep])](#PseudoHTMLDocument+cloneNode) ⇒ [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3909
+ * [.getElementById(id)](#DocumentService+getElementById) ⇒ <code>PseudoElement</code> \| <code>null</code>
3910
+ * [.createElement([tagName])](#DocumentService+createElement) ⇒ <code>PseudoElement</code>
3911
+ * [.createTextNode([data])](#DocumentService+createTextNode) ⇒ [<code>TextService</code>](#TextService)
3912
+ * [.createComment([data])](#DocumentService+createComment) ⇒ [<code>CommentService</code>](#CommentService)
3913
+ * [.createDocumentFragment()](#DocumentService+createDocumentFragment) ⇒ [<code>DocumentFragmentService</code>](#DocumentFragmentService)
3638
3914
  * [.appendChild(childNode)](#NodeService+appendChild) ⇒ <code>PseudoNode</code>
3639
- * [.cloneShallow()](#NodeService+cloneShallow) ⇒ [<code>NodeService</code>](#NodeService)
3640
3915
  * [.equalsShallow(other)](#NodeService+equalsShallow) ⇒ <code>boolean</code>
3641
3916
  * [.append(...nodes)](#NodeService+append)
3642
3917
  * [.prepend(...nodes)](#NodeService+prepend)
@@ -3651,7 +3926,6 @@ from that linker, and its parent from the linker's parent when it has not been g
3651
3926
  * [.querySelector(selectors)](#NodeService+querySelector) ⇒ <code>PseudoElement</code> \| <code>null</code>
3652
3927
  * [.querySelectorAll(selectors)](#NodeService+querySelectorAll) ⇒ <code>Array.&lt;PseudoElement&gt;</code>
3653
3928
  * [.childInserted(child)](#NodeService+childInserted)
3654
- * [.cloneNode([deep])](#NodeService+cloneNode) ⇒ <code>PseudoNode</code>
3655
3929
  * [.compareDocumentPosition(otherNode)](#NodeService+compareDocumentPosition) ⇒ <code>number</code>
3656
3930
  * [.contains(otherNode)](#NodeService+contains) ⇒ <code>boolean</code>
3657
3931
  * [.insertBefore(newNode, [referenceNode])](#NodeService+insertBefore) ⇒ <code>PseudoNode</code>
@@ -3660,28 +3934,113 @@ from that linker, and its parent from the linker's parent when it has not been g
3660
3934
  * [.removeChild(childElement)](#NodeService+removeChild) ⇒ <code>PseudoNode</code>
3661
3935
  * [.replaceChild(newChild, oldChild)](#NodeService+replaceChild) ⇒ <code>PseudoNode</code>
3662
3936
 
3663
- <a name="new_LinkedNode_new"></a>
3937
+ <a name="new_PseudoHTMLDocument_new"></a>
3664
3938
 
3665
- ### new LinkedNode(linker, value)
3939
+ ### new PseudoHTMLDocument()
3940
+ The root HTML element is acts as the parent to all HTML elements in the document.
3666
3941
 
3667
- | Param | Type | Description |
3668
- | --- | --- | --- |
3669
- | linker | <code>TreeLinker</code> | The linker holding this node |
3670
- | value | <code>string</code> \| <code>null</code> | The value of the node |
3942
+ <a name="PseudoHTMLDocument+head"></a>
3671
3943
 
3944
+ ### pseudoHTMLDocument.head : <code>PseudoHTMLElement</code>
3945
+ Create document head element
3946
+
3947
+ **Kind**: instance property of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3948
+ <a name="PseudoHTMLDocument+body"></a>
3949
+
3950
+ ### pseudoHTMLDocument.body : <code>PseudoHTMLElement</code>
3951
+ Create document body element
3952
+
3953
+ **Kind**: instance property of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3672
3954
  <a name="NodeService+acceptsChildren"></a>
3673
3955
 
3674
- ### linkedNode.acceptsChildren ⇒ <code>boolean</code>
3956
+ ### pseudoHTMLDocument.acceptsChildren ⇒ <code>boolean</code>
3675
3957
  Whether this kind of node can have children (text, comments and attributes cannot).
3676
3958
 
3677
- **Kind**: instance property of [<code>LinkedNode</code>](#LinkedNode)
3959
+ **Kind**: instance property of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3678
3960
  **Overrides**: [<code>acceptsChildren</code>](#NodeService+acceptsChildren)
3961
+ <a name="PseudoHTMLDocument+cloneShallow"></a>
3962
+
3963
+ ### pseudoHTMLDocument.cloneShallow() ⇒ [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3964
+ A copy of this document with none of its html/head/body (cloneNode, from the inherited cloneShallow hook, fills
3965
+ them back in, deep copies own document's, empty otherwise - see cloneNode).
3966
+
3967
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3968
+ **Overrides**: [<code>cloneShallow</code>](#NodeService+cloneShallow)
3969
+ <a name="PseudoHTMLDocument+cloneNode"></a>
3970
+
3971
+ ### pseudoHTMLDocument.cloneNode([deep]) ⇒ [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3972
+ Make a copy of this document. The copy has no parent or listeners, and a deep copy has copies of everything in
3973
+ the document (a shallow one is an empty document).
3974
+
3975
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3976
+ **Overrides**: [<code>cloneNode</code>](#NodeService+cloneNode)
3977
+
3978
+ | Param | Type | Default | Description |
3979
+ | --- | --- | --- | --- |
3980
+ | [deep] | <code>boolean</code> | <code>false</code> | Copy everything in the document as well |
3981
+
3982
+ <a name="DocumentService+getElementById"></a>
3983
+
3984
+ ### pseudoHTMLDocument.getElementById(id) ⇒ <code>PseudoElement</code> \| <code>null</code>
3985
+ The first element, in tree order, whose id matches the given value, or null when there is none.
3986
+
3987
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3988
+ **Overrides**: [<code>getElementById</code>](#DocumentService+getElementById)
3989
+
3990
+ | Param | Type |
3991
+ | --- | --- |
3992
+ | id | <code>string</code> |
3993
+
3994
+ <a name="DocumentService+createElement"></a>
3995
+
3996
+ ### pseudoHTMLDocument.createElement([tagName]) ⇒ <code>PseudoElement</code>
3997
+ Make an element of the given type which belongs to this document but is not added anywhere until it is appended.
3998
+
3999
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
4000
+ **Overrides**: [<code>createElement</code>](#DocumentService+createElement)
4001
+
4002
+ | Param | Type | Default | Description |
4003
+ | --- | --- | --- | --- |
4004
+ | [tagName] | <code>string</code> | <code>&quot;&#x27;div&#x27;&quot;</code> | The type of element to create |
4005
+
4006
+ <a name="DocumentService+createTextNode"></a>
4007
+
4008
+ ### pseudoHTMLDocument.createTextNode([data]) ⇒ [<code>TextService</code>](#TextService)
4009
+ Make a text node which belongs to this document.
4010
+
4011
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
4012
+ **Overrides**: [<code>createTextNode</code>](#DocumentService+createTextNode)
4013
+
4014
+ | Param | Type | Default | Description |
4015
+ | --- | --- | --- | --- |
4016
+ | [data] | <code>string</code> | <code>&quot;&#x27;&#x27;&quot;</code> | The text |
4017
+
4018
+ <a name="DocumentService+createComment"></a>
4019
+
4020
+ ### pseudoHTMLDocument.createComment([data]) ⇒ [<code>CommentService</code>](#CommentService)
4021
+ Make a comment which belongs to this document.
4022
+
4023
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
4024
+ **Overrides**: [<code>createComment</code>](#DocumentService+createComment)
4025
+
4026
+ | Param | Type | Default | Description |
4027
+ | --- | --- | --- | --- |
4028
+ | [data] | <code>string</code> | <code>&quot;&#x27;&#x27;&quot;</code> | The comment |
4029
+
4030
+ <a name="DocumentService+createDocumentFragment"></a>
4031
+
4032
+ ### pseudoHTMLDocument.createDocumentFragment() ⇒ [<code>DocumentFragmentService</code>](#DocumentFragmentService)
4033
+ Make an empty document fragment which belongs to this document, a container for nodes which can be built up and
4034
+ then inserted in one go.
4035
+
4036
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
4037
+ **Overrides**: [<code>createDocumentFragment</code>](#DocumentService+createDocumentFragment)
3679
4038
  <a name="NodeService+appendChild"></a>
3680
4039
 
3681
- ### linkedNode.appendChild(childNode) ⇒ <code>PseudoNode</code>
4040
+ ### pseudoHTMLDocument.appendChild(childNode) ⇒ <code>PseudoNode</code>
3682
4041
  Add a node as the last child of this node (a node which is already in a tree is moved).
3683
4042
 
3684
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4043
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3685
4044
  **Overrides**: [<code>appendChild</code>](#NodeService+appendChild)
3686
4045
  **Returns**: <code>PseudoNode</code> - The added node
3687
4046
 
@@ -3689,21 +4048,13 @@ Add a node as the last child of this node (a node which is already in a tree is
3689
4048
  | --- | --- | --- |
3690
4049
  | childNode | <code>PseudoNode</code> | The node to add |
3691
4050
 
3692
- <a name="NodeService+cloneShallow"></a>
3693
-
3694
- ### linkedNode.cloneShallow() ⇒ [<code>NodeService</code>](#NodeService)
3695
- Make a copy of this node without its children, its parent or its listeners, which is what cloneNode starts from.
3696
- Kinds of node which are made with arguments override this to give them.
3697
-
3698
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
3699
- **Overrides**: [<code>cloneShallow</code>](#NodeService+cloneShallow)
3700
4051
  <a name="NodeService+equalsShallow"></a>
3701
4052
 
3702
- ### linkedNode.equalsShallow(other) ⇒ <code>boolean</code>
4053
+ ### pseudoHTMLDocument.equalsShallow(other) ⇒ <code>boolean</code>
3703
4054
  Whether another node of the same type is equal to this one apart from its children, which isEqualNode compares
3704
4055
  afterwards. Kinds of node with more to compare (an element has attributes) override this.
3705
4056
 
3706
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4057
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3707
4058
  **Overrides**: [<code>equalsShallow</code>](#NodeService+equalsShallow)
3708
4059
 
3709
4060
  | Param | Type | Description |
@@ -3712,10 +4063,10 @@ afterwards. Kinds of node with more to compare (an element has attributes) overr
3712
4063
 
3713
4064
  <a name="NodeService+append"></a>
3714
4065
 
3715
- ### linkedNode.append(...nodes)
4066
+ ### pseudoHTMLDocument.append(...nodes)
3716
4067
  Add nodes (strings become text nodes) as the last children of this node, in the order given.
3717
4068
 
3718
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4069
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3719
4070
  **Overrides**: [<code>append</code>](#NodeService+append)
3720
4071
  **Throws**:
3721
4072
 
@@ -3728,10 +4079,10 @@ Add nodes (strings become text nodes) as the last children of this node, in the
3728
4079
 
3729
4080
  <a name="NodeService+prepend"></a>
3730
4081
 
3731
- ### linkedNode.prepend(...nodes)
4082
+ ### pseudoHTMLDocument.prepend(...nodes)
3732
4083
  Add nodes (strings become text nodes) as the first children of this node, in the order given.
3733
4084
 
3734
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4085
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3735
4086
  **Overrides**: [<code>prepend</code>](#NodeService+prepend)
3736
4087
  **Throws**:
3737
4088
 
@@ -3744,10 +4095,10 @@ Add nodes (strings become text nodes) as the first children of this node, in the
3744
4095
 
3745
4096
  <a name="NodeService+replaceChildren"></a>
3746
4097
 
3747
- ### linkedNode.replaceChildren(...nodes)
4098
+ ### pseudoHTMLDocument.replaceChildren(...nodes)
3748
4099
  Remove every child of this node and put the given nodes (strings become text nodes) in their place, in order.
3749
4100
 
3750
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4101
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3751
4102
  **Overrides**: [<code>replaceChildren</code>](#NodeService+replaceChildren)
3752
4103
  **Throws**:
3753
4104
 
@@ -3760,11 +4111,11 @@ Remove every child of this node and put the given nodes (strings become text nod
3760
4111
 
3761
4112
  <a name="NodeService+before"></a>
3762
4113
 
3763
- ### linkedNode.before(...nodes)
4114
+ ### pseudoHTMLDocument.before(...nodes)
3764
4115
  Add nodes (strings become text nodes) as this node's previous siblings, in order. Does nothing when this node has
3765
4116
  no parent.
3766
4117
 
3767
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4118
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3768
4119
  **Overrides**: [<code>before</code>](#NodeService+before)
3769
4120
 
3770
4121
  | Param | Type | Description |
@@ -3773,11 +4124,11 @@ no parent.
3773
4124
 
3774
4125
  <a name="NodeService+after"></a>
3775
4126
 
3776
- ### linkedNode.after(...nodes)
4127
+ ### pseudoHTMLDocument.after(...nodes)
3777
4128
  Add nodes (strings become text nodes) as this node's next siblings, in order. Does nothing when this node has no
3778
4129
  parent.
3779
4130
 
3780
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4131
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3781
4132
  **Overrides**: [<code>after</code>](#NodeService+after)
3782
4133
 
3783
4134
  | Param | Type | Description |
@@ -3786,11 +4137,11 @@ parent.
3786
4137
 
3787
4138
  <a name="NodeService+replaceWith"></a>
3788
4139
 
3789
- ### linkedNode.replaceWith(...nodes)
4140
+ ### pseudoHTMLDocument.replaceWith(...nodes)
3790
4141
  Put the given nodes (strings become text nodes) where this node is, in order, then remove this node. Does nothing
3791
4142
  when this node has no parent.
3792
4143
 
3793
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4144
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3794
4145
  **Overrides**: [<code>replaceWith</code>](#NodeService+replaceWith)
3795
4146
 
3796
4147
  | Param | Type | Description |
@@ -3799,18 +4150,18 @@ when this node has no parent.
3799
4150
 
3800
4151
  <a name="NodeService+remove"></a>
3801
4152
 
3802
- ### linkedNode.remove()
4153
+ ### pseudoHTMLDocument.remove()
3803
4154
  Remove this node from its parent. Does nothing when it has no parent.
3804
4155
 
3805
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4156
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3806
4157
  **Overrides**: [<code>remove</code>](#NodeService+remove)
3807
4158
  <a name="NodeService+toChildNode"></a>
3808
4159
 
3809
- ### linkedNode.toChildNode(value) ⇒ <code>PseudoNode</code>
4160
+ ### pseudoHTMLDocument.toChildNode(value) ⇒ <code>PseudoNode</code>
3810
4161
  Turn a value given to append / prepend / before / after / replaceWith / replaceChildren into a node: a string
3811
4162
  becomes a text node belonging to this node's document, anything else is returned as it is.
3812
4163
 
3813
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4164
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3814
4165
  **Overrides**: [<code>toChildNode</code>](#NodeService+toChildNode)
3815
4166
 
3816
4167
  | Param | Type | Description |
@@ -3819,10 +4170,10 @@ becomes a text node belonging to this node's document, anything else is returned
3819
4170
 
3820
4171
  <a name="NodeService+getElementsByTagName"></a>
3821
4172
 
3822
- ### linkedNode.getElementsByTagName(tagName) ⇒ <code>PseudoHTMLCollection</code>
4173
+ ### pseudoHTMLDocument.getElementsByTagName(tagName) ⇒ <code>PseudoHTMLCollection</code>
3823
4174
  Every element below this node with the given tag name (or every element when tagName is *), live.
3824
4175
 
3825
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4176
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3826
4177
  **Overrides**: [<code>getElementsByTagName</code>](#NodeService+getElementsByTagName)
3827
4178
 
3828
4179
  | Param | Type |
@@ -3831,10 +4182,10 @@ Every element below this node with the given tag name (or every element when tag
3831
4182
 
3832
4183
  <a name="NodeService+getElementsByClassName"></a>
3833
4184
 
3834
- ### linkedNode.getElementsByClassName(className) ⇒ <code>PseudoHTMLCollection</code>
4185
+ ### pseudoHTMLDocument.getElementsByClassName(className) ⇒ <code>PseudoHTMLCollection</code>
3835
4186
  Every element below this node which has all of the given (space separated) classes, live.
3836
4187
 
3837
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4188
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3838
4189
  **Overrides**: [<code>getElementsByClassName</code>](#NodeService+getElementsByClassName)
3839
4190
 
3840
4191
  | Param | Type |
@@ -3843,10 +4194,10 @@ Every element below this node which has all of the given (space separated) class
3843
4194
 
3844
4195
  <a name="NodeService+querySelector"></a>
3845
4196
 
3846
- ### linkedNode.querySelector(selectors) ⇒ <code>PseudoElement</code> \| <code>null</code>
4197
+ ### pseudoHTMLDocument.querySelector(selectors) ⇒ <code>PseudoElement</code> \| <code>null</code>
3847
4198
  The first element below this node which matches the CSS selector, in tree order, or null when there is none.
3848
4199
 
3849
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4200
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3850
4201
  **Overrides**: [<code>querySelector</code>](#NodeService+querySelector)
3851
4202
 
3852
4203
  | Param | Type | Description |
@@ -3855,11 +4206,11 @@ The first element below this node which matches the CSS selector, in tree order,
3855
4206
 
3856
4207
  <a name="NodeService+querySelectorAll"></a>
3857
4208
 
3858
- ### linkedNode.querySelectorAll(selectors) ⇒ <code>Array.&lt;PseudoElement&gt;</code>
4209
+ ### pseudoHTMLDocument.querySelectorAll(selectors) ⇒ <code>Array.&lt;PseudoElement&gt;</code>
3859
4210
  Every element below this node which matches the CSS selector, in tree order. A plain array (not a live
3860
4211
  collection): like the DOM's querySelectorAll, it is a snapshot taken when it is called.
3861
4212
 
3862
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4213
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3863
4214
  **Overrides**: [<code>querySelectorAll</code>](#NodeService+querySelectorAll)
3864
4215
 
3865
4216
  | Param | Type | Description |
@@ -3868,39 +4219,26 @@ collection): like the DOM's querySelectorAll, it is a snapshot taken when it is
3868
4219
 
3869
4220
  <a name="NodeService+childInserted"></a>
3870
4221
 
3871
- ### linkedNode.childInserted(child)
4222
+ ### pseudoHTMLDocument.childInserted(child)
3872
4223
  Called each time a node has been inserted as a child of this node, so that nodes which need to react to children
3873
4224
  (for example elements applying default events) can do so.
3874
4225
 
3875
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4226
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3876
4227
  **Overrides**: [<code>childInserted</code>](#NodeService+childInserted)
3877
4228
 
3878
4229
  | Param | Type | Description |
3879
4230
  | --- | --- | --- |
3880
4231
  | child | [<code>NodeService</code>](#NodeService) | The node which was inserted |
3881
4232
 
3882
- <a name="NodeService+cloneNode"></a>
3883
-
3884
- ### linkedNode.cloneNode([deep]) ⇒ <code>PseudoNode</code>
3885
- Make a copy of this node (without its parent, and without its event listeners). With deep the children are copied
3886
- too, all the way down.
3887
-
3888
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
3889
- **Overrides**: [<code>cloneNode</code>](#NodeService+cloneNode)
3890
-
3891
- | Param | Type | Default | Description |
3892
- | --- | --- | --- | --- |
3893
- | [deep] | <code>boolean</code> | <code>false</code> | Copy the children as well |
3894
-
3895
4233
  <a name="NodeService+compareDocumentPosition"></a>
3896
4234
 
3897
- ### linkedNode.compareDocumentPosition(otherNode) ⇒ <code>number</code>
4235
+ ### pseudoHTMLDocument.compareDocumentPosition(otherNode) ⇒ <code>number</code>
3898
4236
  Say where another node is in relation to this one, as the bits of NodeService.DOCUMENT_POSITION_*: 0 for this node
3899
4237
  itself, DISCONNECTED (with IMPLEMENTATION_SPECIFIC and a consistent PRECEDING or FOLLOWING) for a node in another tree,
3900
4238
  CONTAINS + PRECEDING when the other node is an ancestor, CONTAINED_BY + FOLLOWING when it is a descendant,
3901
4239
  otherwise PRECEDING or FOLLOWING by their order in the tree.
3902
4240
 
3903
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4241
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3904
4242
  **Overrides**: [<code>compareDocumentPosition</code>](#NodeService+compareDocumentPosition)
3905
4243
 
3906
4244
  | Param | Type | Description |
@@ -3909,10 +4247,10 @@ otherwise PRECEDING or FOLLOWING by their order in the tree.
3909
4247
 
3910
4248
  <a name="NodeService+contains"></a>
3911
4249
 
3912
- ### linkedNode.contains(otherNode) ⇒ <code>boolean</code>
4250
+ ### pseudoHTMLDocument.contains(otherNode) ⇒ <code>boolean</code>
3913
4251
  Check whether a node is this node or one of its descendants.
3914
4252
 
3915
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4253
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3916
4254
  **Overrides**: [<code>contains</code>](#NodeService+contains)
3917
4255
 
3918
4256
  | Param | Type | Description |
@@ -3921,11 +4259,11 @@ Check whether a node is this node or one of its descendants.
3921
4259
 
3922
4260
  <a name="NodeService+insertBefore"></a>
3923
4261
 
3924
- ### linkedNode.insertBefore(newNode, [referenceNode]) ⇒ <code>PseudoNode</code>
4262
+ ### pseudoHTMLDocument.insertBefore(newNode, [referenceNode]) ⇒ <code>PseudoNode</code>
3925
4263
  Insert a node as a child of this node, before the given child (or at the end when there is none). A node which is
3926
4264
  already in a tree is moved, and the children of a document fragment are moved in order.
3927
4265
 
3928
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4266
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3929
4267
  **Overrides**: [<code>insertBefore</code>](#NodeService+insertBefore)
3930
4268
  **Returns**: <code>PseudoNode</code> - The inserted node
3931
4269
  **Throws**:
@@ -3940,11 +4278,11 @@ already in a tree is moved, and the children of a document fragment are moved in
3940
4278
 
3941
4279
  <a name="NodeService+isEqualNode"></a>
3942
4280
 
3943
- ### linkedNode.isEqualNode(otherNode) ⇒ <code>boolean</code>
4281
+ ### pseudoHTMLDocument.isEqualNode(otherNode) ⇒ <code>boolean</code>
3944
4282
  Whether another node is the same as this one, by what they hold: the same type, name and value (an element also
3945
4283
  needs the same attributes), and children which are equal in the same order.
3946
4284
 
3947
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4285
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3948
4286
  **Overrides**: [<code>isEqualNode</code>](#NodeService+isEqualNode)
3949
4287
 
3950
4288
  | Param | Type | Description |
@@ -3953,17 +4291,17 @@ needs the same attributes), and children which are equal in the same order.
3953
4291
 
3954
4292
  <a name="NodeService+normalize"></a>
3955
4293
 
3956
- ### linkedNode.normalize()
4294
+ ### pseudoHTMLDocument.normalize()
3957
4295
  Tidy the text below this node: neighbouring text nodes are joined into one and empty text nodes are removed.
3958
4296
 
3959
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4297
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3960
4298
  **Overrides**: [<code>normalize</code>](#NodeService+normalize)
3961
4299
  <a name="NodeService+removeChild"></a>
3962
4300
 
3963
- ### linkedNode.removeChild(childElement) ⇒ <code>PseudoNode</code>
4301
+ ### pseudoHTMLDocument.removeChild(childElement) ⇒ <code>PseudoNode</code>
3964
4302
  Remove a child from this node, it no longer has a parent or siblings afterwards.
3965
4303
 
3966
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4304
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3967
4305
  **Overrides**: [<code>removeChild</code>](#NodeService+removeChild)
3968
4306
  **Returns**: <code>PseudoNode</code> - The removed node
3969
4307
  **Throws**:
@@ -3977,10 +4315,10 @@ Remove a child from this node, it no longer has a parent or siblings afterwards.
3977
4315
 
3978
4316
  <a name="NodeService+replaceChild"></a>
3979
4317
 
3980
- ### linkedNode.replaceChild(newChild, oldChild) ⇒ <code>PseudoNode</code>
4318
+ ### pseudoHTMLDocument.replaceChild(newChild, oldChild) ⇒ <code>PseudoNode</code>
3981
4319
  Replace a child of this node with another node (which is moved if it is already in a tree).
3982
4320
 
3983
- **Kind**: instance method of [<code>LinkedNode</code>](#LinkedNode)
4321
+ **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
3984
4322
  **Overrides**: [<code>replaceChild</code>](#NodeService+replaceChild)
3985
4323
  **Returns**: <code>PseudoNode</code> - The replaced node
3986
4324
  **Throws**:
@@ -3993,134 +4331,6 @@ Replace a child of this node with another node (which is moved if it is already
3993
4331
  | newChild | <code>PseudoNode</code> | The node which takes the place |
3994
4332
  | oldChild | <code>PseudoNode</code> | The child of this node to replace |
3995
4333
 
3996
- <a name="PseudoNodeList"></a>
3997
-
3998
- ## PseudoNodeList ⇐ <code>LinkedTreeList</code>
3999
- A NodeList, like the DOM one, iterates over the nodes themselves (the data stored in each TreeLinker), rather than
4000
- the linkers that hold them.
4001
-
4002
- **Kind**: global class
4003
- **Extends**: <code>LinkedTreeList</code>
4004
-
4005
- * [PseudoNodeList](#PseudoNodeList) ⇐ <code>LinkedTreeList</code>
4006
- * [.entries()](#PseudoNodeList+entries) ⇒ <code>Iterator</code>
4007
- * [.keys()](#PseudoNodeList+keys) ⇒ <code>Iterator</code>
4008
- * [.values()](#PseudoNodeList+values) ⇒ <code>Iterator</code>
4009
-
4010
- <a name="PseudoNodeList+entries"></a>
4011
-
4012
- ### pseudoNodeList.entries() ⇒ <code>Iterator</code>
4013
- Iterate over [index, node] pairs.
4014
-
4015
- **Kind**: instance method of [<code>PseudoNodeList</code>](#PseudoNodeList)
4016
- <a name="PseudoNodeList+keys"></a>
4017
-
4018
- ### pseudoNodeList.keys() ⇒ <code>Iterator</code>
4019
- Iterate over the indexes.
4020
-
4021
- **Kind**: instance method of [<code>PseudoNodeList</code>](#PseudoNodeList)
4022
- <a name="PseudoNodeList+values"></a>
4023
-
4024
- ### pseudoNodeList.values() ⇒ <code>Iterator</code>
4025
- Iterate over the nodes.
4026
-
4027
- **Kind**: instance method of [<code>PseudoNodeList</code>](#PseudoNodeList)
4028
- <a name="PseudoHTMLDocument"></a>
4029
-
4030
- ## PseudoHTMLDocument ⇐ <code>PseudoHTMLElement</code>
4031
- Simulate the behaviour of the HTMLDocument Class when there is no DOM available.
4032
-
4033
- **Kind**: global class
4034
- **Extends**: <code>PseudoHTMLElement</code>
4035
- **Author**: Joshua Heagle <joshuaheagle@gmail.com>
4036
- **Properties**
4037
-
4038
- | Name | Type | Description |
4039
- | --- | --- | --- |
4040
- | head | <code>PseudoHTMLElement</code> | A reference to the Head child element |
4041
- | body | <code>PseudoHTMLElement</code> | A reference to the Body child element |
4042
- | createElement | <code>function</code> | Generate a new PseudoHTMLElement (which is not in the document until it is appended) |
4043
-
4044
-
4045
- * [PseudoHTMLDocument](#PseudoHTMLDocument) ⇐ <code>PseudoHTMLElement</code>
4046
- * [new PseudoHTMLDocument()](#new_PseudoHTMLDocument_new)
4047
- * [.head](#PseudoHTMLDocument+head) : <code>PseudoHTMLElement</code>
4048
- * [.body](#PseudoHTMLDocument+body) : <code>PseudoHTMLElement</code>
4049
- * [.createElement(tagName)](#PseudoHTMLDocument+createElement) ⇒ <code>PseudoHTMLElement</code>
4050
- * [.createTextNode([data])](#PseudoHTMLDocument+createTextNode) ⇒ [<code>TextService</code>](#TextService)
4051
- * [.createComment([data])](#PseudoHTMLDocument+createComment) ⇒ [<code>CommentService</code>](#CommentService)
4052
- * [.createDocumentFragment()](#PseudoHTMLDocument+createDocumentFragment) ⇒ [<code>DocumentFragmentService</code>](#DocumentFragmentService)
4053
- * [.cloneNode([deep])](#PseudoHTMLDocument+cloneNode) ⇒ <code>PseudoNode</code>
4054
-
4055
- <a name="new_PseudoHTMLDocument_new"></a>
4056
-
4057
- ### new PseudoHTMLDocument()
4058
- The root HTML element is acts as the parent to all HTML elements in the document.
4059
-
4060
- <a name="PseudoHTMLDocument+head"></a>
4061
-
4062
- ### pseudoHTMLDocument.head : <code>PseudoHTMLElement</code>
4063
- Create document head element
4064
-
4065
- **Kind**: instance property of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
4066
- <a name="PseudoHTMLDocument+body"></a>
4067
-
4068
- ### pseudoHTMLDocument.body : <code>PseudoHTMLElement</code>
4069
- Create document body element
4070
-
4071
- **Kind**: instance property of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
4072
- <a name="PseudoHTMLDocument+createElement"></a>
4073
-
4074
- ### pseudoHTMLDocument.createElement(tagName) ⇒ <code>PseudoHTMLElement</code>
4075
- Make an element of the given type which belongs to this document but is not added anywhere until it is appended.
4076
-
4077
- **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
4078
-
4079
- | Param | Type | Default | Description |
4080
- | --- | --- | --- | --- |
4081
- | tagName | <code>string</code> | <code>&quot;div&quot;</code> | Tag Name is a string representing the type of Dom element this represents |
4082
-
4083
- <a name="PseudoHTMLDocument+createTextNode"></a>
4084
-
4085
- ### pseudoHTMLDocument.createTextNode([data]) ⇒ [<code>TextService</code>](#TextService)
4086
- Make a text node which belongs to this document.
4087
-
4088
- **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
4089
-
4090
- | Param | Type | Default | Description |
4091
- | --- | --- | --- | --- |
4092
- | [data] | <code>string</code> | <code>&quot;&#x27;&#x27;&quot;</code> | The text |
4093
-
4094
- <a name="PseudoHTMLDocument+createComment"></a>
4095
-
4096
- ### pseudoHTMLDocument.createComment([data]) ⇒ [<code>CommentService</code>](#CommentService)
4097
- Make a comment which belongs to this document.
4098
-
4099
- **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
4100
-
4101
- | Param | Type | Default | Description |
4102
- | --- | --- | --- | --- |
4103
- | [data] | <code>string</code> | <code>&quot;&#x27;&#x27;&quot;</code> | The comment |
4104
-
4105
- <a name="PseudoHTMLDocument+createDocumentFragment"></a>
4106
-
4107
- ### pseudoHTMLDocument.createDocumentFragment() ⇒ [<code>DocumentFragmentService</code>](#DocumentFragmentService)
4108
- Make an empty document fragment which belongs to this document, a container for nodes which can be built up and
4109
- then inserted in one go.
4110
-
4111
- **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
4112
- <a name="PseudoHTMLDocument+cloneNode"></a>
4113
-
4114
- ### pseudoHTMLDocument.cloneNode([deep]) ⇒ <code>PseudoNode</code>
4115
- Make a copy of this document. The copy has no parent or listeners, and a deep copy has copies of everything in the
4116
- document (a shallow one is an empty document).
4117
-
4118
- **Kind**: instance method of [<code>PseudoHTMLDocument</code>](#PseudoHTMLDocument)
4119
-
4120
- | Param | Type | Default | Description |
4121
- | --- | --- | --- | --- |
4122
- | [deep] | <code>boolean</code> | <code>false</code> | Copy everything in the document as well |
4123
-
4124
4334
  <a name="PseudoEventListener"></a>
4125
4335
 
4126
4336
  ## PseudoEventListener
@@ -4263,10 +4473,6 @@ The values follow the UI Events, HTML, Pointer Events, Clipboard, Drag and Drop,
4263
4473
  ## focused
4264
4474
  The element which has the focus, kept for each tree (the root node of the tree it is in), like document.activeElement.
4265
4475
 
4266
- **Kind**: global constant
4267
- <a name="HTMLElementService_1"></a>
4268
-
4269
- ## HTMLElementService\_1 : <code>PseudoHTMLElement</code>
4270
4476
  **Kind**: global constant
4271
4477
  <a name="modifierKeys"></a>
4272
4478
 
@@ -4352,14 +4558,6 @@ Create a PseudoNodeList, optionally starting from an existing chain of linkers.
4352
4558
  | --- | --- | --- |
4353
4559
  | [innerList] | <code>TreeLinker</code> \| <code>null</code> | <code></code> |
4354
4560
 
4355
- <a name="generateNode"></a>
4356
-
4357
- ## generateNode() ⇒ <code>function</code>
4358
- Create a TreeLinker class whose linkers each store a node (a LinkedNode) as their data, this can be used to build a
4359
- tree (or list) of nodes from plain values.
4360
-
4361
- **Kind**: global function
4362
- **Returns**: <code>function</code> - The NodeFactory class (a TreeLinker) to use as the linker class
4363
4561
  <a name="generateDocument"></a>
4364
4562
 
4365
4563
  ## generateDocument(root, context) ⇒ <code>Window</code> \| <code>PseudoEventTarget</code>
@@ -4417,6 +4615,28 @@ Walk up from a node (not including it) to find the nearest element, in the given
4417
4615
  | node | <code>\*</code> | The node to start from |
4418
4616
  | direction | <code>&#x27;nextSibling&#x27;</code> \| <code>&#x27;previousSibling&#x27;</code> | Which sibling reference to follow |
4419
4617
 
4618
+ <a name="kebabToCamel"></a>
4619
+
4620
+ ## kebabToCamel(name) ⇒ <code>string</code>
4621
+ kebab-case -> camelCase ("background-color" -> "backgroundColor").
4622
+
4623
+ **Kind**: global function
4624
+
4625
+ | Param | Type |
4626
+ | --- | --- |
4627
+ | name | <code>string</code> |
4628
+
4629
+ <a name="camelToKebab"></a>
4630
+
4631
+ ## camelToKebab(name) ⇒ <code>string</code>
4632
+ camelCase -> kebab-case ("backgroundColor" -> "background-color").
4633
+
4634
+ **Kind**: global function
4635
+
4636
+ | Param | Type |
4637
+ | --- | --- |
4638
+ | name | <code>string</code> |
4639
+
4420
4640
  <a name="createEvent"></a>
4421
4641
 
4422
4642
  ## createEvent(type, [init], [options]) ⇒ [<code>EventService</code>](#EventService)
@@ -4434,3 +4654,14 @@ real user action (isTrusted).
4434
4654
  | [init] | <code>Object</code> | <code>{}</code> | The options for the event (bubbles, cancelable, composed and those of its kind of event) |
4435
4655
  | [options] | <code>CreateEventOptions</code> | <code>{}</code> | Whether the browser is creating the event, and whether it is trusted |
4436
4656
 
4657
+ <a name="dataAttributes"></a>
4658
+
4659
+ ## dataAttributes(element) ⇒ <code>Array.&lt;Array.&lt;string&gt;&gt;</code>
4660
+ Every data-* attribute name currently on the element, as [attributeName, camelCaseName] pairs.
4661
+
4662
+ **Kind**: global function
4663
+
4664
+ | Param | Type |
4665
+ | --- | --- |
4666
+ | element | <code>\*</code> |
4667
+