https://github.com/horo-t/explainers/blob/main/script_element_supports.md
https://html.spec.whatwg.org/multipage/scripting.html#dom-script-supports
Provides a unified way to detect new features that use script elements.
Currently there is no simple way to know what kind of types can be used for HTMLScriptElement’s type attribute.
There are several new feature proposals using the script element.
https://github.com/WICG/import-maps/
https://github.com/jeremyroman/alternate-loading-modes/blob/main/triggers.md#speculation-rules
https://github.com/WICG/resource-bundles/
We can use the nomodule attribute to detect the module type support. But there is no unified method to detect such new features.
If we have the HTMLScriptElement.supports(type) method which is like linkElement.relList.supports(), we can easily detect such features.
https://github.com/whatwg/html/issues/6472
Pending
Gecko: Supportive on the issue and pull request but no formal signal yet
WebKit: No signal
Web developers: The developer feedback on the spec issue was positive.
Developers will be able to call this method from DevTools's console.
Yes
https://crrev.com/c/3133553 will add WPT tests.
--enable-blink-features=ScriptElementSupports
False
https://bugs.chromium.org/p/chromium/issues/detail?id=1245528
No milestones specified
https://www.chromestatus.com/feature/5712146835963904
This intent message was generated by Chrome Platform Status.
Contact emails
Explainer
https://github.com/horo-t/explainers/blob/main/script_element_supports.md
Specification
https://html.spec.whatwg.org/multipage/scripting.html#dom-script-supports
Summary
Provides a unified way to detect new features that use script elements.
Blink component
Motivation
Currently there is no simple way to know what kind of types can be used for HTMLScriptElement’s type attribute.
There are several new feature proposals using the script element.
https://github.com/WICG/import-maps/
https://github.com/jeremyroman/alternate-loading-modes/blob/main/triggers.md#speculation-rules
https://github.com/WICG/resource-bundles/
We can use the nomodule attribute to detect the module type support. But there is no unified method to detect such new features.
If we have the HTMLScriptElement.supports(type) method which is like linkElement.relList.supports(), we can easily detect such features.
Initial public proposal
https://github.com/whatwg/html/issues/6472
TAG review
TAG review status
Pending
Risks
Interoperability and Compatibility
Gecko: Supportive on the issue and pull request but no formal signal yet
WebKit: No signal
Web developers: The developer feedback on the spec issue was positive.
Debuggability
Developers will be able to call this method from DevTools's console.
Is this feature fully tested by web-platform-tests?
Yes
https://crrev.com/c/3133553 will add WPT tests.
Flag name
--enable-blink-features=ScriptElementSupports
Requires code in //chrome?
False
Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1245528
Estimated milestones
No milestones specified
Link to entry on the Chrome Platform Status
https://www.chromestatus.com/feature/5712146835963904
This intent message was generated by Chrome Platform Status.
--
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+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADk0S-VYs68fp19ARTmiz9-68nodU5%3Djf_bbfGcJ81Z-ar%2BsPw%40mail.gmail.com.