Intent to prototype and ship: Scripting media feature

325 views
Skip to first unread message

CanadaHonk

unread,
Mar 28, 2023, 4:11:56 AM3/28/23
to dev-pl...@mozilla.org
As of today, I intend to turn on the scripting media feature by default on all platforms. It has not been developed behind a flag, rather being enabled by default in the implementation patch as it is a low-risk feature. No other browsers ship or implement the feature at this time.

Summary:
The scripting media feature allows web developers to change styling using a media query, rather than having to use JS or the noscript element, which is not very easy or intuitive.

Standards body: W3C CSSWG
Platform coverage: All

Preference: None
DevTools bug: https://bugzil.la/1824689 for rule view. Emulation is not needed.

Other browsers:
- Blink: Not shipped or implemented. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=489957
- WebKit: Not shipped or implemented. No bug filed.

Web platform tests: Added in Gecko patch, https://phabricator.services.mozilla.com/D172995

How stable is the spec: Media Queries Level 5 is currently a Working Draft.
Security & privacy concerns: There are practically no concerns at this time, as the information given by this feature is the same as other features which currently exist, like the noscript element.
Web designer / developer use-cases: Instead of having to use JavaScript to add a class when executed, or wrap styles in noscript elements, with the scripting media feature CSS can simply use a media query to detect JS being enabled/disabled.

Oojmed

unread,
Apr 3, 2023, 11:38:45 AM4/3/23
to g.m...@informaction.com, dev-pl...@mozilla.org
Hi,

In this current implementation at least, it only takes account if scripting is actually disabled internally, and doesn't take into account CSP. Personally, I would love for it to be part of the spec for the reasons you said, but I don't know if the spec would consider that sort of external usage (extensions/etc) as something which should be taken into account. I'll follow along with spec issue and change the implementation if accepted.

Thanks!



---- On Tue, 28 Mar 2023 10:39:01 +0100 g.m...@informaction.com wrote ----

Hello,

implementation wise, does the "none" value apply to document whose document-level scripting is disabled by a restrictive CSP?

That would help a lot browser extensions used to control page scripting, such as NoScript, uBlock and uMatrix, and their users, as detailed in this issue asking to clarify the specification.

Thank you!
-- G
--
You received this message because you are subscribed to the Google Groups "dev-pl...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform...@mozilla.org.
To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/8d5c58d9-9f8a-4728-8e99-5b25d2ffbf84n%40mozilla.org.



Giorgio Maone

unread,
Apr 3, 2023, 11:38:53 AM4/3/23
to dev-pl...@mozilla.org
Hello,

implementation wise, does the "none" value apply to document whose document-level scripting is disabled by a restrictive CSP?

That would help a lot browser extensions used to control page scripting, such as NoScript, uBlock and uMatrix, and their users, as detailed in this issue asking to clarify the specification.

Thank you!
-- G

On 28/03/23 10:11, CanadaHonk wrote:
--
You received this message because you are subscribed to the Google Groups "dev-pl...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform...@mozilla.org.
To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/8d5c58d9-9f8a-4728-8e99-5b25d2ffbf84n%40mozilla.org.


-- 
Giorgio Maone
https://maone.net
Reply all
Reply to author
Forward
0 new messages