-
Notifications
You must be signed in to change notification settings - Fork 42
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is a no JS website possible with this if put thought some preprocessor (Speculation) #14
Comments
The technique used by htmz is likened to the technique used by htmx. Its function and use cases have been extensively documented and written about on htmx.org. I recommend you go read about hypermedia and HATEOAS on htmx.org Essays. Htmz is merely a ultra lightweight implementation without any bells or whistles. |
I don't think noJS is possible. But what you're describing as a preprocessor is similar to one of the examples (as a Cloudflare worker): https://github.com/Kalabasa/htmz/blob/eda6e50296b4309665a9792e6c6a8c1d682ec1ce/examples/cf_clean_target_tabs/worker.js Otherwise, I think you're looking for a HTML templating system? |
In theory, if all you need to do is apply a selector and replace HTML, the browser should be able to do it without going through the JS engine. The only reason htmz needs JS is because the HTML specification doesn't have a keyword for |
Then perhaps this ticket should be more "How do we get Is this where we should post the proposal to? If so then how do we exactly describe the required changes? |
Yes, it would be whatwg/html. I think there are two slightly different things being discussed in this thread:
htmz implements #2 only. #1 is being proposed in whatwg/html#2791. A separate proposal is probably better for #2 because it would be simpler. It wouldn't have to deal with render blocking and circular dependency issues as in #1. Converting this into a Discussion. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
If I understand the snippet correctly, this search and replaces the doc and replace specific sections with a specially formatted iframe.
If that's the case, then in theory it could be possible to add a script to this htmz for static website generators to add some dynamic capabilities to their site (but without having to add JS code to it).
Application for this technique could be for torsites that should really not have javascript enabled.
You still want to keep the snippet as it makes things easier without having to integrate a preprocessor. But basically this would be an extra optional script in this repo that developers can optionally call. It would read a html input and scan for a htmlz snippet (to indicate it is being used) and then do the search and replace of required tags with an iframe) before outputting to stdio
The text was updated successfully, but these errors were encountered: