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
data: elements <circle id="c1" cx="10" r="5" fill="red"/>
189
+
data: elements <circle id="c2" cx="20" r="5" fill="green"/>
190
+
data: elements <circle id="c3" cx="30" r="5" fill="blue"/>
191
+
```
192
+
</details>
193
+
178
194
`PatchElements` sends HTML elements to the browser for DOM manipulation.
179
195
180
196
> [!TIP]
@@ -218,6 +234,7 @@ String enum defining how elements are patched into the DOM.
218
234
|`selector`| string | Element ID | CSS selector for target element. If a selector is not specified, each element must have an ID specified. |
219
235
|`mode`| ElementPatchMode |`outer`| How to patch the element |
220
236
|`useViewTransition`| boolean |`false`| Enable view transitions API |
237
+
|`wrap`| string | Tag name | Tag name used to control the [namespace](https://developer.mozilla.org/en-US/docs/Web/API/Element/namespaceURI) of each element. If a tag name is not specified, elements will be created in the HTML namespace. |
221
238
222
239
### Implementation
223
240
@@ -227,6 +244,7 @@ String enum defining how elements are patched into the DOM.
227
244
-`selector SELECTOR\n` (if provided)
228
245
-`mode PATCH_MODE\n` (if not `outer`)
229
246
-`useViewTransition true\n` (if `true`)
247
+
-`wrap TAG_NAME\n` (if provided)
230
248
-`elements HTML_LINE\n` (for each line of HTML)
231
249
232
250
---
@@ -414,4 +432,3 @@ The function ***must*** parse the incoming HTTP request based on the method:
414
432
| Others | Request body | JSON | Parse request body directly |
415
433
416
434
**Error Handling**: ***Must*** return error for invalid JSON.
0 commit comments