Request for position on Import Conditions

# Daniel Clark (10 hours ago)

Hello WebKit-dev,

I'd like to ask for WebKit's official position on import conditions, as described in the explainer at [1]. This proposal adds an inline syntax for module import statements to pass on more information alongside the module specifier. It includes support for JSON modules as a primary application, with the "type" condition used to mitigate the security issue described in [2] that previously blocked their adoption in HTML. The proposal is designed such that other conditions can be added in the future for additional use cases, some of which may not yet be anticipated.

The champion group is particularly interested in your opinion on whether it's acceptable for import conditions to not be part of the module map key. The current state of our HTML spec integration PR at [3] is that they are not part of the module map key. We perform module map caching such that there will always be no more than a single fetch for a given module specifier regardless of failed module type checks. The thread at [4] discusses this issue in detail.

We plan to request Stage 3 for this proposal at the upcoming TC39 meeting beginning on July 20.

[1] Explainer: tc39/proposal-import-conditions [2] Modules MIME-type security issue: w3c/webcomponents#839 [3] HTML Spec integration PR: whatwg/html#5658 [4] HTML integration thread: whatwg/html#5640 Mozilla standards-position ("worth prototyping") mozilla/standards-positions#373

Thanks! Dan Clark

Contact us to advertise here

Want more features?

Request early access to our private beta of readable email premium.