Intent to Ship: Media Queries: scripting feature

240 views
Skip to first unread message

Luke

unread,
Aug 26, 2023, 11:57:01 AM8/26/23
to blin...@chromium.org

Contact emails

lukewa...@gmail.comlu...@warlow.dev

Explainer

None

Specification

https://drafts.csswg.org/mediaqueries-5/#scripting

Summary

The scripting media feature is used to query whether scripting languages, such as JavaScript, are supported on the current document. Valid options are 'enabled', 'initial-only', 'none'. However, 'initial-only' never matches inside a browser.



Blink component

Blink>CSS

Search tags

scriptingmedia-queries

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

Already implemented in Firefox and WebKit so only interoperability risk would be differing implementions. As of the other day WebKit now matches Chromium and Firefoxs implementation.



Gecko: Shipped/Shipping (https://groups.google.com/a/mozilla.org/g/dev-platform/c/BU3zzial8lE/m/6e2LBQFIAwAJ)

WebKit: Shipped/Shipping (https://github.com/WebKit/WebKit/pull/15076)

Web developers: No signals

Other signals:

Ergonomics

This feature will not be used in tandem with other platform APIs. The default usage of this API will not make it hard for chrome to maintain good performance.



Activation

It will not be challenging for developers to use this feature immediately. There is already an MDN article for this feature, so I don't think that we need additional outreach.



Security

There are no security risks for this feature.



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

This media query can be tested using the 'Disable JavaScript' setting inside of DevTools Preferences.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

Flag name on chrome://flags

#enable-experimental-web-platform-features

Finch feature name

ScriptingMediaFeature

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1467097

Availability expectation

This feature is already implemented by safari and firefox, so it will be available on the web platform mainline as soon as it reaches the stable version of all browsers.

Adoption expectation

This will be considered best practice for its use case once launched

Adoption plan

This is already implemented in safari and firefox, so we don't need to do anything in order to gain adoption of this feature.

Non-OSS dependencies

Does the feature depend on any code or APIs outside the Chromium open source repository and its open-source dependencies to function?

No

Sample links


https://developer.mozilla.org/en-US/docs/Web/CSS/@media/scripting

Estimated milestones

Shipping on desktop118
DevTrial on desktop118
Shipping on Android118
DevTrial on Android118
Shipping on WebView118


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).

There are no anticipated spec changes.

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5075009105559552

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/B553347A-4C67-494D-8F85-8DA7A4274881%40gmail.com

This intent message was generated by Chrome Platform Status.

Manuel Rego Casasnovas

unread,
Aug 30, 2023, 11:02:53 AM8/30/23
to Luke, blin...@chromium.org
LGTM1

Thanks for catching up on this feature.

Cheers,
Rego

On 26/08/2023 17:56, Luke wrote:
>
> Contact emails
>
> lukewa...@gmail.com
> <mailto:lukewa...@gmail.com>, lu...@warlow.dev <mailto:lu...@warlow.dev>
>
>
> Explainer
>
> None
>
>
> Specification
>
> https://drafts.csswg.org/mediaqueries-5/#scripting
> <https://drafts.csswg.org/mediaqueries-5/#scripting>
>
>
> Summary
>
> The scripting media feature is used to query whether scripting
> languages, such as JavaScript, are supported on the current document.
> Valid options are 'enabled', 'initial-only', 'none'. However,
> 'initial-only' never matches inside a browser.
>
>
>
> Blink component
>
> Blink>CSS
> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3ECSS>
>
>
> Search tags
>
> scripting
> <https://chromestatus.com/features#tags:scripting>, media-queries
> <https://chromestatus.com/features#tags:media-queries>
>
>
> TAG review
>
> None
>
>
> TAG review status
>
> Not applicable
>
>
> Risks
>
>
>
> Interoperability and Compatibility
>
> Already implemented in Firefox and WebKit so only interoperability risk
> would be differing implementions. As of the other day WebKit now matches
> Chromium and Firefoxs implementation.
>
>
>
> /Gecko/: Shipped/Shipping
> (https://groups.google.com/a/mozilla.org/g/dev-platform/c/BU3zzial8lE/m/6e2LBQFIAwAJ <https://groups.google.com/a/mozilla.org/g/dev-platform/c/BU3zzial8lE/m/6e2LBQFIAwAJ>)
>
> /WebKit/: Shipped/Shipping (https://github.com/WebKit/WebKit/pull/15076
> <https://github.com/WebKit/WebKit/pull/15076>)
>
> /Web developers/: No signals
>
> /Other signals/:
>
>
> Ergonomics
>
> This feature will not be used in tandem with other platform APIs. The
> default usage of this API will not make it hard for chrome to maintain
> good performance.
>
>
>
> Activation
>
> It will not be challenging for developers to use this feature
> immediately. There is already an MDN article for this feature, so I
> don't think that we need additional outreach.
>
>
>
> Security
>
> There are no security risks for this feature.
>
>
>
> 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
>
> This media query can be tested using the 'Disable JavaScript' setting
> inside of DevTools Preferences.
>
>
>
> Will this feature be supported on all six Blink platforms
> (Windows, Mac, Linux, Chrome OS, 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>?
> prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/B553347A-4C67-494D-8F85-8DA7A4274881%40gmail.com <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/B553347A-4C67-494D-8F85-8DA7A4274881%40gmail.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+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6179F828-749D-4315-A222-4828733AAC81%40gmail.com <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6179F828-749D-4315-A222-4828733AAC81%40gmail.com?utm_medium=email&utm_source=footer>.

Daniel Bratell

unread,
Aug 30, 2023, 11:18:53 AM8/30/23
to Manuel Rego Casasnovas, Luke, blin...@chromium.org
LGTM2

/Daniel

Yoav Weiss

unread,
Aug 30, 2023, 11:32:56 AM8/30/23
to Daniel Bratell, Manuel Rego Casasnovas, Luke, blin...@chromium.org
LGTM3

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/737b6fb0-c4e9-585e-d77d-3c06142a429f%40gmail.com.
Reply all
Reply to author
Forward
0 new messages