This feels like a natural fix to a critically under-specified feature.

In future, I'd like to see the TAG push back on things like Import Maps and 
Speculation Rules that use `<script type="...">` as a semantic black box. 
These features need to:

   - Compose consistently, or at least sanely (as this Intent proposes)
   - Expose mutation events that aren't just "some text content changed"
   - Provide proper DOM traversal and manipulation APIs
   - Generally be expressible in ways that aren't just inline JSON blobs

It's bad enough that we are still awash in `<script 
type="application/ld+json">` as barnacle on HTML semantics, but we 
shouldn't keep adding to the damage.

Best,

Alex

On Tuesday, November 19, 2024 at 1:09:06 PM UTC-8 Yoav Weiss wrote:

> Contact emailsyoavwe...@chromium.org
>
> Explainerhttps://github.com/whatwg/html/pull/10528#issue-2437162429
>
> Specificationhttps://github.com/whatwg/html/pull/10528
>
> Summary
>
> Import maps currently have to load before any ES module and there can only 
> be a single import map per document. That makes them fragile and 
> potentially slow to use in real-life scenarios: Any module that loads 
> before them breaks the entire app, and in apps with many modules they 
> become a large blocking resource, as the entire map for all possible 
> modules needs to load first. This feature is to enable multiple import maps 
> per document, by merging them in a consistent and deterministic way.
>
>
> Blink componentBlink>HTML>Modules 
> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EHTML%3EModules>
>
> TAG reviewhttps://github.com/w3ctag/design-reviews/issues/980
>
> TAG review statusIssues addressed
>
> Risks
>
>
> Interoperability and Compatibility
>
> This feature changes the existing behavior of import maps, but does so in 
> a backwards compatible way. Sites that have working import maps right now 
> will continue to work. The main compatibility risk may come from sites with 
> import maps that aren't working today (either defined after module loads or 
> multiple of them) that would start working after this feature ships. As 
> such maps are currently throwing errors, I wouldn't expect them to be 
> common in functioning sites, and there's even a chance that this change 
> will fix such sites.
>
>
> One thing to note is that we haven't defined a non-destructive way to 
> feature-detect this change. I believe this is fine, as (similar to JS 
> language features) sites would need to use UA version sniffing to know if 
> they can deliver multiple (smaller) import maps or a single large one.
>
>
> In terms of interop risk, WebKit has expressed a positive position, and 
> I'm planning to implement the feature there as well.
>
>
> *Gecko*: No signal (
> https://github.com/mozilla/standards-positions/issues/1058)
>
> *WebKit*: Support (
> https://github.com/WebKit/standards-positions/issues/381)
>
> *Web developers*: Positive 
> Shopify is interested in seeing this ship. 
> We also have 6 positive reactions on 
> https://github.com/whatwg/html/pull/10528 and an LGTM from Guy Bedford, 
> who authored the relevant polyfill.
>
> *Other signals*:
>
> WebView application risks
>
> Does this intent deprecate or change behavior of existing APIs, such that 
> it has potentially high risk for Android WebView-based applications?
>
> None
>
>
> Debuggability
>
> None
>
>
> Will this feature be supported on all six Blink platforms (Windows, Mac, 
> Linux, ChromeOS, Android, and Android WebView)?Yes
>
> Is this feature fully tested by web-platform-tests 
> <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>
> ?Yes
>
>
> https://wpt.fyi/results/import-maps/multiple-import-maps?label=experimental&label=master&aligned
>  
> https://wpt.fyi/results/import-maps/not-overridden?label=master&label=experimental&aligned
>
>
> Flag name on about://flagsNone
>
> Finch feature nameMultipleImportMaps
>
> Requires code in //chrome?False
>
> Estimated milestones
> Shipping on desktop 133
> Shipping on Android 133
> Shipping on WebView 133
>
> Anticipated spec changes
>
> Open questions about a feature may be a source of future web compat or 
> interop issues. Please list open issues (e.g. links to known github issues 
> in the project for the feature specification) whose resolution may 
> introduce web compat/interop risk (e.g., changing to naming or structure of 
> the API in a non-backward-compatible way).
>
>
> None
>
> Link to entry on the Chrome Platform Status
> https://chromestatus.com/feature/5121916248260608?gate=5126546826985472
>
> Links to previous Intent discussionsIntent to Prototype: 
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOmohSJrxQj19LattoOyE3Af5dn%3D50UD9ecpHZWjVZ5-GrMr9w%40mail.gmail.com
>
>
> This intent message was generated by Chrome Platform Status 
> <https://chromestatus.com/>.
>

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/db5e53f9-9abf-49a0-a0bd-4b7be197c527n%40chromium.org.

Reply via email to