File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,23 @@ Hyperscript has an open, pluggable grammar & some advanced features do not ship
160160To use a feature like workers you can install the extension directly by including ` /dist/workers.js ` after you
161161include hyperscript.
162162
163+ If your HTML is received via AJAX or generated by scripts after initial page load, you need to call
164+ ` _hyperscript.processNode() ` to process the scripts on the new elements.
165+
166+ ~~~ js
167+ element .appendChild (newContent);
168+ _hyperscript .processNode (newContent);
169+ ~~~
170+
171+ You can also call it from hyperscript itself
172+
173+ ~~~ hyperscript
174+ call _hyperscript.processNode(#new_element_id)
175+ ```
176+
177+ Elements added by the [`put`](/commands/put) command are processed automatically; no need to call this function.
178+ [`Htmx`](https://htmx.org) does the same for all processed fragments.
179+
163180## Language Basics {#basics}
164181
165182A hyperscript script consists of a series of ["features"](/reference#features), the most common of which is an
You can’t perform that action at this time.
0 commit comments