Skip to content

Commit 8677d3e

Browse files
committed
[mediaqueries] defer 'scripting' to level 5
1 parent 801a3e8 commit 8677d3e

4 files changed

Lines changed: 36 additions & 64 deletions

File tree

mediaqueries-5/Overview.bs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,23 @@ Scripting Media Features</h2>
160160
<h3 id="scripting">
161161
Scripting Support: the 'scripting' feature</h3>
162162

163-
<pre class='descdef partial mq'>
163+
<pre class='descdef mq'>
164164
Name: scripting
165165
Value: none | initial-only | enabled
166166
For: @media
167167
Type: discrete
168168
</pre>
169169

170-
Issue: Definition to be copied from Level 4 when final. This level adds the ''initial-only'' value.
170+
The 'scripting' media feature is used to query whether scripting languages,
171+
such as JavaScript,
172+
are supported on the current document.
171173

172174
<dl dfn-type=value dfn-for="@media/scripting">
175+
<dt><dfn>enabled</dfn>
176+
<dd>
177+
Indicates that the user agent supports scripting of the page
178+
and that support is active for the current document.
179+
173180
<dt><dfn>initial-only</dfn>
174181
<dd>
175182
Indicates that scripting is enabled during the initial page load,
@@ -206,8 +213,22 @@ Scripting Support: the 'scripting' feature</h3>
206213
which typically do run them,
207214
but may decide not to based on timeouts and other heuristics.
208215

216+
<dt><dfn>none</dfn>
217+
<dd>
218+
Indicates that the user agent will not run scripts for this document;
219+
either it doesn't support a scripting language,
220+
or the support isn't active for the current document.
209221
</dl>
210222

223+
Some user agents have the ability to turn off scripting support on a per script basis or per domain basis,
224+
allowing some, but not all, scripts to run in a particular document.
225+
The 'scripting' media feature does not allow fine grained detection of which script is allowed to run.
226+
In this scenario, the value of the 'scripting' media feature should be ''scripting/enabled''
227+
if scripts originating on the same domain as the document are allowed to run,
228+
and ''scripting/none'' otherwise.
229+
230+
Note: A future level of CSS may extend this media feature to allow fine-grained detection of which script is allowed to run.
231+
211232
<!--
212233
██████ ██ ██ ██████ ████████ ███████ ██ ██ ██ ██ ███████
213234
██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ███ ███ ███ ██ ██

mediaqueries/Overview.bs

Lines changed: 6 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Abstract: Media Queries Level 4 describes the mechanism and syntax of media quer
2020
Ignored Terms: min-resolution, max-resolution, none, view-mode, mediaText, CSSOMString
2121
Link Defaults: css-break-3 (property) break-inside
2222
Link Defaults: css-cascade-3 (at-rule) @import
23-
At Risk: '@media/scripting'
2423
Can I Use URL: https://drafts.csswg.org/mediaqueries-4/
2524
Can I Use URL: http://drafts.csswg.org/mediaqueries-4/
2625
Can I Use URL: https://drafts.csswg.org/mediaqueries/
@@ -455,7 +454,7 @@ Media Feature Types: “range” and “discrete”</h4>
455454
Every media feature defines its “type” as either “range” or “discrete” in its definition table.
456455

457456
“Discrete” media features,
458-
like 'pointer' or 'scripting',
457+
like 'pointer'
459458
take their values from a set.
460459
The values may be keywords
461460
or boolean numbers (0 and 1),
@@ -510,12 +509,12 @@ Evaluating Media Features in a Boolean Context</h4>
510509
<div class='example'>
511510
Some <a>media features</a> are designed to be written like this.
512511

513-
For example, 'scripting' is typically written as ''(scripting)'' to test if scripting is enabled,
514-
or ''not (scripting)'' to see if it's disabled.
512+
For example, 'update' is typically written as ''(update)'' to test if any kind of updating is available,
513+
or ''not (update)'' to check for the opposite.
515514

516515
It can still be given an explicit value as well,
517-
with ''(scripting: enabled)'' equal to ''(scripting)'',
518-
and ''(scripting: none)'' equal to ''not (scripting)''.
516+
with ''(update: fast) or (update: slow)'' equal to ''(update)'',
517+
and ''(update: none)'' equal to ''not (update)''.
519518
</div>
520519

521520
<div class='example'>
@@ -1882,57 +1881,6 @@ All Available Interaction Capabilities: the 'any-pointer' and 'any-hover' featur
18821881
or to hide them altogether to reduce visual clutter if ''(any-pointer: fine)'' is false.
18831882
</div>
18841883

1885-
<!--
1886-
██████ ██████ ████████ ████ ████████ ████████ ████ ██ ██ ██████
1887-
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██
1888-
██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██
1889-
██████ ██ ████████ ██ ████████ ██ ██ ██ ██ ██ ██ ████
1890-
██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██
1891-
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██
1892-
██████ ██████ ██ ██ ████ ██ ██ ████ ██ ██ ██████
1893-
-->
1894-
1895-
<h2 id='mf-scripting'>
1896-
Scripting Media Features</h2>
1897-
1898-
<h3 id="scripting">
1899-
Scripting Support: the 'scripting' feature</h3>
1900-
1901-
<em>This feature is at risk.</em>
1902-
1903-
<pre class='descdef mq'>
1904-
Name: scripting
1905-
Value: none | enabled
1906-
For: @media
1907-
Type: discrete
1908-
</pre>
1909-
1910-
The 'scripting' media feature is used to query whether scripting languages,
1911-
such as JavaScript,
1912-
are supported on the current document.
1913-
1914-
<dl dfn-type=value dfn-for="@media/scripting">
1915-
<dt><dfn>enabled</dfn>
1916-
<dd>
1917-
Indicates that the user agent supports scripting of the page
1918-
and that support is active for the current document.
1919-
1920-
<dt><dfn>none</dfn>
1921-
<dd>
1922-
Indicates that the user agent will not run scripts for this document;
1923-
either it doesn't support a scripting language,
1924-
or the support isn't active for the current document.
1925-
</dl>
1926-
1927-
Some user agents have the ability to turn off scripting support on a per script basis or per domain basis,
1928-
allowing some, but not all, scripts to run in a particular document.
1929-
The 'scripting' media feature does not allow fine grained detection of which script is allowed to run.
1930-
In this scenario, the value of the 'scripting' media feature should be ''scripting/enabled''
1931-
if scripts originating on the same domain as the document are allowed to run,
1932-
and ''scripting/none'' otherwise.
1933-
1934-
Note: A future level of CSS may extend this media feature to allow fine-grained detection of which script is allowed to run.
1935-
19361884
<!--
19371885
████ ██████ ██████ ██ ██ ████████ ██████
19381886
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
@@ -2119,8 +2067,7 @@ The following changes were made to this specification since the
21192067
<a>Media features</a> with numeric values can now be written in a <a href="#mq-range-context">range context</a>.
21202068

21212069
<li>
2122-
The 'scripting',
2123-
'pointer',
2070+
The 'pointer',
21242071
'any-pointer',
21252072
'hover',
21262073
'any-hover',

mediaqueries/issues-wd-2016-01-26.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,16 @@ <h1>Media Queries Level 4 Disposition of Comments for 2016-01-26 WD</h1>
5555
Response: <a href='https://lists.w3.org/Archives/Public/www-style/2016Mar/0356.html'>https://lists.w3.org/Archives/Public/www-style/2016Mar/0356.html</a>
5656
Closed: Accepted
5757
Resolved: <a href='https://lists.w3.org/Archives/Public/www-style/2016Mar/0356.html'>https://lists.w3.org/Archives/Public/www-style/2016Mar/0356.html</a></pre>
58-
<pre class=' open' id='issue-4'>
58+
<pre class='a' id='issue-4'>
5959
Issue 4. <a href='#issue-4'>#</a>
6060
Summary: Rename 'scripting: enabled'
6161
From: fantasai
6262
Comment: <a href='https://lists.w3.org/Archives/Public/www-style/2016Feb/0042.html'>https://lists.w3.org/Archives/Public/www-style/2016Feb/0042.html</a>
6363
Comment: <a href='https://lists.w3.org/Archives/Public/www-style/2016Feb/0057.html'>https://lists.w3.org/Archives/Public/www-style/2016Feb/0057.html</a>
6464
Response: <a href='https://lists.w3.org/Archives/Public/www-style/2016Feb/0070.html'>https://lists.w3.org/Archives/Public/www-style/2016Feb/0070.html</a>
65-
Open: =WG= Discuss</pre>
65+
Closed: Retracted
66+
Verified: <a href='https://logs.csswg.org/irc.w3.org/css/2017-05-17/#e809965'>https://logs.csswg.org/irc.w3.org/css/2017-05-17/#e809965</a>
67+
Note: The whole feature was later deffered to level 5</pre>
6668
<pre class='d' id='issue-5'>
6769
Issue 5. <a href='#issue-5'>#</a>
6870
Summary: Define minimum for 'scripting: initial-only'

mediaqueries/issues-wd-2016-01-26.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ From: fantasai
3434
Comment: https://lists.w3.org/Archives/Public/www-style/2016Feb/0042.html
3535
Comment: https://lists.w3.org/Archives/Public/www-style/2016Feb/0057.html
3636
Response: https://lists.w3.org/Archives/Public/www-style/2016Feb/0070.html
37-
Open: =WG= Discuss
37+
Closed: Retracted
38+
Verified: https://logs.csswg.org/irc.w3.org/css/2017-05-17/#e809965
39+
Note: The whole feature was later deffered to level 5
3840
----
3941
Issue 5.
4042
Summary: Define minimum for 'scripting: initial-only'

0 commit comments

Comments
 (0)