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

justinfagnani left a comment (WICG/webcomponents#645)

Scripts are indeed the toughest question, IMO, because they have to be addressed in any attempt at this feature, MVP or no.

If scripts don't run in the first cut, they can't suddenly run in a future update. If they run in the first cut, we have to get the semantics correct in a forward-compatible way, including whether or not exports from inline scripts become exports in the HTML module and a few other things.

I would love to see some incremental way to start... I think there are two potential approaches that could be done in parallel:

- A minim HTM modules where the presence of scripts _throw_ in module evaluation. This preserves the ability to move forward with running scripts in the future. We can focus on exporting DOM.
- Adding some features we've talking about under HTMl modules to main-page HTML itself where scripts already do run. Things like importing and exporting between inline scripts. Getting a promise of the exports object from a script tag. `import.meta.url`, etc.

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

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

Received on Tuesday, 25 February 2025 21:46:52 UTC