Re: [WICG/webcomponents] HTML Modules (#645)

noamr left a comment (WICG/webcomponents#645)

I am looking into whether this (together with client-side includes) can be part of the next work on declarative partial updates.
Please see https://github.com/WICG/declarative-partial-updates/blob/main/fragment-include-explainer.md for details.
In short:
- fragment modules, in the spirit of this proposal
- A fragment is cloned when imported
- `<script type=fragment src="...">` replaces the script in-place with the contents of the fragment (like a client-side include)
- imported fragments are safely sanitized by default, and can be made unsafe (with a run-scripts option) by an opt-in (attribute or some such)
- async/defer work like in other scripts
- relative URLs are not rebased to the URL of the import. This can be a future enhancement but is a big undertaking.

I think this covers all the concerns and debates here but there are ~300 comments here so I've likely missed something.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/645#issuecomment-4212772478
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/645/4212772478@github.com>

Received on Thursday, 9 April 2026 08:35:34 UTC