W3C home > Mailing lists > Public > www-style@w3.org > November 2013

Re: [mediaqueries4] does script MQ react to changes?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 4 Nov 2013 10:50:31 -0800
Message-ID: <CAAWBYDBDFs9pkejdNuQp9d+tF30vXG8urpFAR=w6SMKiZmXS7w@mail.gmail.com>
To: David Newton <david@davidnewton.ca>
Cc: www-style Mailing List <www-style@w3.org>
On Mon, Nov 4, 2013 at 10:27 AM, David Newton <david@davidnewton.ca> wrote:
> The Editor’s Draft for MQ Level 4 says about `script`:
>> The ‘script’ media feature is used to query whether ECMAscript is supported on the current document. If the user agent supports ECMAscript, and that support is active for the current document the value must be 1. Otherwise, the value must be 0.
> Given the “support is active” requirement, will the value of `script` respond to changes in the browser, the same way a `min-width` query will respond to viewport changes? If so, what would trigger the change?

Media Queries, as used in CSS, are declarative. They do indeed change
value when the thing they're based on changes.

The only way for (script) to change dynamically is if the browser
offers the user a way to disable JS, as I believe FF does.  In that
case, the user toggling it while the page is active would change the
value.  (Assuming that the browser live-updates the liveness of
scripts on the page.  It might require a page refresh instead, so that
scripts which assume they were being run in a live environment, as
they were encountered, don't break.  In that case, the value of
(script) for the page would likewise

> Would it change from 1 to 0 if a script breaks/errors out? Presumably not, because there might be other scripts that are still functional.

Nope, script is still running in that case.

> Would it change if a user disables JavaScript while viewing a page? Current behaviour suggests that JavaScript would continue to be enabled until the user reloads the page, so again, presumably not.

Depends entirely on browser behavior, as I described above.

Received on Monday, 4 November 2013 18:51:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:36 UTC