Re: [mediaqueries] scripting

On Tue, Feb 9, 2016 at 7:13 PM, Florian Rivoal <> wrote:
>> On Feb 10, 2016, at 10:09, Tab Atkins Jr. <> wrote:
>> On Sun, Feb 7, 2016 at 7:03 PM, Florian Rivoal <> wrote:
>>>> On Feb 6, 2016, at 04:03, fantasai <> wrote:
>>>> # scripting:
>>>> #   enabled
>>>> #     Indicates that the user agent supports scripting of the page and
>>>> #     that support is active for the current document.
>>>> #   initial-only
>>>> #     Indicates that scripting is enabled during the initial page load,
>>>> #     but is not supported afterwards. Examples are printed pages, or
>>>> #     pre-rendering network proxies that render a page on a server and
>>>> #     send a nearly-static version of the page to the user.
>>>> #   none
>>>> #     Indicates that the user agent will not run scripts for this document;
>>>> #     either it doesn’t support a scripting language, or the support isn’t
>>>> #     active for the current document.
>>>> I'm wondering if what you actually mean here is more like
>>>> scripting: none | onload | interact
>>>> ?
>>>> Or does 'initial-only' not fire onload events, either?
>>> I don't think 'initial-only' was attempting to be specific about exactly
>>> at what point scripts stop running, but just generally capturing the idea
>>> that at first they run, but eventually that stops. Maybe we can be explicit
>>> that this means going at least as far as firing the onload events?
>> We're intentionally vague here, and I don't think there's much value
>> in being more specific.  The intention seems relatively clear, and
>> regardless of precisely when script stops being run, it still matches
>> the intention of "initial-only".
>> (Theoretically something could, say, run scripts for the first 60s
>> then stop, which would be semantically between the two.  But such a UA
>> doesn't exist and would be pretty silly, so I'm happy to ignore the
>> possibility.)
> Right. I don't think we should pin down exactly how long the scripts run,
> since there are too many possible variants. But maybe we can set a minimum
> threshold, so that authors have something to depend on. Can they depend
> on the onload even firing if @scripting: initial-only is true, or is there
> a risk that a UA which runs synchronous scripts as they get parsed but
> never fires any event would still match?

I don't think we should determine any of this.  We don't care.  Our MQ
is so that authors can safely guard styles that will be used on an
"active scripting" page and not pollute the printed/etc page.
Precisely when that happens doesn't really matter for our purposes,
and the choice of exactly how much script gets run in an
"initial-only" UA is a quality-of-implementation decision.  If they
cut it off too early they'll break pages *regardless* of this MQ.

> As for running scripts for up to 60 seconds, I don't know of any UA that
> does that, but I think Opera mini has a complicated set of rules that boil
> down to a bound around 5 seconds. But that's still past the onload event, so
> it should still qualify as initial-only.



Received on Wednesday, 10 February 2016 04:14:17 UTC