← Back to release summary

Disallow unknown import attributes

Category
JavaScript
Type
No developer-visible change
Status
Enabled by default (Chrome 119)
Intent stage
None

WPT details: https://wpt.fyi/results/html/semantics/scripting-1/the-script-element/import-assertions/unsupported-assertion.html?label=master&label=experimental&aligned=&q=import-assertions

Summary

Throw an error when using unknown keys in import attributes (formerly known as import assertions), such as "import 'x' assert { unknown: 'val' }`, rather than ignoring them. The only accepted attribute remains "type".

Standards & signals

Ecosystem

View on chromestatus.com