What is the IFRAME advantage over shadowDOM? #22
Replies: 6 comments 1 reply
-
A lot more code, but looks interesting! Could you share how I could have an Thank you. |
Beta Was this translation helpful? Give feedback.
-
You don't have to load it in another element, |
Beta Was this translation helpful? Give feedback.
-
That means one can't use it to do what htmz does, so it's not an alternative. |
Beta Was this translation helpful? Give feedback.
-
Or replace with And do its only modern JavaScript... |
Beta Was this translation helpful? Give feedback.
-
Hi @Danny-Engelman ! That isn't enough to replace htmz I'm afraid. You'd need some additional system for handling form submissions, links, and buttons to load new content into some other element. |
Beta Was this translation helpful? Give feedback.
-
Hi, htmz works on click.
As others have mentioned, the advantage of iframes is that they can be Converting to Discussion. |
Beta Was this translation helpful? Give feedback.
-
With a
<load-file>
Web Component you have the choice of loading any content into DOM, or in shadowDOM to keep<style>
scoped... and even move (global) style (or any Node for that matter) to shadowDOMNo need to define it before being used like your htmz function; any existing
<load-file>
will upgrade automagically.source: a DEV.to Post from 2021
Beta Was this translation helpful? Give feedback.
All reactions