@fusion.dev/helix-docs 0.168.0 → 0.170.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.
@@ -134,10 +134,32 @@ your elements and the element that takes focus is in its shadow root. Test for
134
134
  support before you use element references. Assigning to a property that an
135
135
  engine does not implement does nothing and throws no error.
136
136
 
137
- ## A child dispatches a ready event to its parent
138
-
139
- A parent cannot poll for a child that has not upgraded yet. The child dispatches
140
- a bubbling ready event, and the parent listens for it.
137
+ ## A parent finds its children
138
+
139
+ A child does not announce itself to its parent, and there is no ready event. A
140
+ parent cannot wait on a child that has not upgraded, so what the parent needs
141
+ from the child decides how it finds it:
142
+
143
+ - For what you slotted, read `assignedElements` on the slot, and read it again
144
+ on `slotchange`.
145
+ - For children that arrive, move, or change outside a slot, observe the light
146
+ DOM with a `MutationObserver`.
147
+ - For a child's property, wait on `customElements.whenDefined`. A custom element
148
+ has no properties before it upgrades.
149
+ - For a child's state that a script can change with no event, add a controller
150
+ to the child with `addController`. Its `hostUpdated` runs after every update
151
+ of the child.
152
+ - Where the child holds the answer, it finds its parent by identity with
153
+ `closestInstance`, as `Accordion.Item` does.
154
+
155
+ ## Serve the values of a data table
156
+
157
+ A data table reads each cell from its column, and the server does not pass it
158
+ its columns, so it serves its headings and no values. Write the first page under
159
+ the columns as `helix-table-row` and `helix-table-cell` elements, in the table's
160
+ sort and page size. The table shows them until `rows` holds a row, then draws
161
+ its own rows in their place. See [React](./react) for the server component
162
+ version.
141
163
 
142
164
  ## Write a server spec
143
165