You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 17, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: chtml/v1/html-partials/README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -272,11 +272,11 @@ HTML Partials introduces a few new DOM properties for working with composition.
272
272
**For the document object:**
273
273
274
274
+`.templatesReadyState` - This property reflects the status of loading templates:
275
-
+`loading` - Templates currently loading.
276
-
+`complete` - Templates done loading, or no remote templates at all. The`templatesreadystatechange` event is fired on the document object.
275
+
+`loading` - This is the initial value of this property.
276
+
+`complete` - This is the value of this property when templates are done loading, or when there are no remote templates at all. For this state, the`templatesreadystatechange` event is fired on the document object.
277
277
+`.templates` - This property represents the list of templates in the document. Templates are exposed here by name. So `document.templates.template1` should return the template element used in the examples above.
278
278
279
-
**For the <template> element:**
279
+
**For the `<template>` element:**
280
280
281
281
+`.partials` - This property represents the list of partials defined by the template. It is an object holding a reference to partials by name. Unnamed partials are treated as having the name *default*. So, for the template below,
282
282
@@ -308,7 +308,7 @@ HTML Partials introduces a few new DOM properties for working with composition.
308
308
309
309
+ `.template` - This property represents a copy of the `<template>` element referenced by an element. So if an element implements a template as in `<divtemplate="html/temp"></div>`, then `element.template` should be a copy of the `<template>` at the `module/temp` namespace; `element.template.partials.default` should thus return an array like the above.
310
310
311
-
**For the <slot> element:**
311
+
**For the `<slot>` element:**
312
312
313
313
+ `.slottedElements` - This property represents the list of partials slotted into a slot. (Much like the [`HTMLSlotElement.assignedElements()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements) method.)
314
314
+ `.resolve()` - This method, without arguments, is used to programatically resolve a slot from the appropriate partial in the template given in context.
Copy file name to clipboardExpand all lines: chtml/v1/installation.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ $ npm i --save @web-native-js/chtml
40
40
41
41
The installed package is designed to be *initialized* with the *window* object of the current browser or server evironment. To do this, import the `ENV` object and assign the *window* object to it, then call the initializer.
42
42
43
-
+**Initialize the Complete Suite**
43
+
+**Initialize the Complete Suite** - Initialize the module below for everything about CHTML.
44
44
45
45
```js
46
46
// Import
@@ -50,7 +50,7 @@ The installed package is designed to be *initialized* with the *window* object o
50
50
init();
51
51
```
52
52
53
-
+**Initialize Individual Features**
53
+
+**Initialize Individual Features** - Find a module below for a specific CHTML feature.
0 commit comments