|
|
|
|
|
by recursivedoubts
726 days ago
|
|
i agree we are tentatively working on a proposal with the chrome team that takes the most important concepts of htmx and integrates them into HTML using more standard attributes. Alex Petros, a core htmx dev, gave a talk at Big Sky Dev Con on this idea here: https://www.youtube.com/watch?v=inRB6ull5WQ this will obviously be a much longer and more difficult process, but hopefully it will give HTML enough oomph that htmx will often be unnecessary all of that doesn't change the fact that the code above is hyperscript, not htmx |
|
* use on* html attributes to delegate events to a universal event handler
* event handler pulls out the form attribute (if set), then pulls out action, method, target from element, or from the form if unset on the element (elements inherit these from the form they are tied to)
* if action is a URL, then initialize a fetch request using specified URL and method; if method is POST, then add a FormData payload for the specified form
* on fetch complete, the returned MIME type should match with the target attribute, which is extended to also accept a css selector:
So something like: I have ideas for extending beyond this, but this seems like the core of extending HTML to cover htmx semantics.