Contact emails

h...@chromium.org


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

Blink>HTML>Script
<https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EHTML%3EScript>


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/WICG/import-maps/>


https://github.com/jeremyroman/alternate-loading-modes/blob/main/triggers.md#speculation-rules
<https://github.com/jeremyroman/alternate-loading-modes/blob/main/triggers.md#speculation-rules>

  https://github.com/WICG/resource-bundles/
<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


RisksInteroperability and Compatibility

Gecko: Supportive on the issue <https://github.com/whatwg/html/issues/6472>
and pull request <https://github.com/whatwg/html/pull/7008> but no formal
signal yet

WebKit: No signal

Web developers: The developer feedback on the spec issue
<https://github.com/whatwg/html/issues/6472> was positive.


Debuggability

Developers will be able to call this method from DevTools's console.


Is this feature fully tested by web-platform-tests
<https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>
?

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
<https://www.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 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.

Reply via email to