Skip to content

Commit c08e4c0

Browse files
committed
[mediaqueries] Add scripting: initial-only.
1 parent b8e3bcc commit c08e4c0

2 files changed

Lines changed: 35 additions & 26 deletions

File tree

mediaqueries/Overview.html

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,24 +1845,34 @@ <h2 class="heading settled heading" data-level=9 id=mf-scripting><span class=sec
18451845
<h3 class="heading settled heading" data-level=9.1 id=scripting><span class=secno>9.1 </span><span class=content>
18461846
scripting</span><a class=self-link href=#scripting></a></h3>
18471847

1848-
<table class="definition descdef mq" data-dfn-for=@media><tr><th>Name:<td><dfn class=css-code data-dfn-for=@media data-dfn-type=descriptor data-export="" id=descdef-scripting>scripting<a class=self-link href=#descdef-scripting></a></dfn><tr><th>For:<td><a class=css-code data-link-type=at-rule href=http://dev.w3.org/csswg/css-conditional-3/#at-ruledef-media title=@media>@media</a><tr><th>Value:<td>none | enabled<tr><th>Type:<td>discrete</table>
1849-
<p> The <a class=property data-link-type=propdesc href=#descdef-scripting title=scripting>scripting</a> media feature is used to query whether ECMAscript is supported
1850-
on the current document.
1848+
<table class="definition descdef mq" data-dfn-for=@media><tr><th>Name:<td><dfn class=css-code data-dfn-for=@media data-dfn-type=descriptor data-export="" id=descdef-scripting>scripting<a class=self-link href=#descdef-scripting></a></dfn><tr><th>For:<td><a class=css-code data-link-type=at-rule href=http://dev.w3.org/csswg/css-conditional-3/#at-ruledef-media title=@media>@media</a><tr><th>Value:<td>none | initial-only | enabled<tr><th>Type:<td>discrete</table>
1849+
<p> The <a class=property data-link-type=propdesc href=#descdef-scripting title=scripting>scripting</a> media feature is used to query whether scripting languages,
1850+
such as JavaScript,
1851+
are supported on the current document.
18511852

18521853
<dl data-dfn-for=@media/scripting data-dfn-type=value>
18531854
<dt><dfn class=css-code data-dfn-for=@media/scripting data-dfn-type=value data-export="" id=valuedef-enabled>enabled<a class=self-link href=#valuedef-enabled></a></dfn>
18541855
<dd>
1855-
Indicates that the user agent supports ECMAscript
1856+
Indicates that the user agent supports scripting of the page
18561857
and that support is active for the current document.
18571858

1859+
<dt><dfn class=css-code data-dfn-for=@media/scripting data-dfn-type=value data-export="" id=valuedef-initial-only>initial-only<a class=self-link href=#valuedef-initial-only></a></dfn>
1860+
<dd>
1861+
Indicates that scripting is enabled during the initial page load,
1862+
but is not supported afterwards.
1863+
Examples are printed pages,
1864+
or pre-rendering network proxies
1865+
that render a page on a server
1866+
and send a nearly-static version of the page to the user.
1867+
18581868
<dt><dfn class=css-code data-dfn-for=@media/scripting data-dfn-type=value data-export="" id=valuedef-none>none<a class=self-link href=#valuedef-none></a></dfn>
18591869
<dd>
18601870
Indicates that the user agent will not run scripts for this document;
1861-
either it doesn’t support ECMAScript,
1871+
either it doesn’t support a scripting language,
18621872
or the support isn’t active for the current document.
18631873
</dl>
18641874

1865-
<p> Some user agents have the ability to turn off ECMAscript support on a per script basis or per domain basis,
1875+
<p> Some user agents have the ability to turn off scripting support on a per script basis or per domain basis,
18661876
allowing some, but not all, scripts to run in a particular document.
18671877
The <a class=property data-link-type=propdesc href=#descdef-scripting title=scripting>scripting</a> media feature does not allow fine grained detection of which script is allowed to run.
18681878
In this scenario, the value of the <a class=property data-link-type=propdesc href=#descdef-scripting title=scripting>scripting</a> media feature should be <a class=css data-link-for=scripting data-link-type=maybe href=#valuedef-enabled title=enabled>enabled</a>
@@ -1871,10 +1881,6 @@ <h3 class="heading settled heading" data-level=9.1 id=scripting><span class=secn
18711881

18721882
<p class=note> Note: A future level of CSS may extend this media feature to allow fine-grained detection of which script is allowed to run.
18731883

1874-
<p class=issue id=issue-b8cd6af1><a class=self-link href=#issue-b8cd6af1></a>
1875-
What about a value for "runs script on load, but not continuously",
1876-
like Opera Mini?
1877-
18781884
<h2 class="heading settled heading" data-level=10 id=assorted-issues><span class=secno>10 </span><span class=content>
18791885
Assorted Issues</span><a class=self-link href=#assorted-issues></a></h2>
18801886

@@ -2136,7 +2142,8 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
21362142
<li>height, <a href=#descdef-height title="section 4.2">4.2</a>
21372143
<li>hover<ul><li>descriptor for @media, <a href=#descdef-hover title="section 7.2">7.2</a>
21382144
<li>value for @media/hover, <a href=#valuedef-hover title="section 7.2">7.2</a>
2139-
</ul><li>interlace, <a href=#valuedef-interlace title="section 5.2">5.2</a>
2145+
</ul><li>initial-only, <a href=#valuedef-initial-only title="section 9.1">9.1</a>
2146+
<li>interlace, <a href=#valuedef-interlace title="section 5.2">5.2</a>
21402147
<li>light-level, <a href=#descdef-light-level title="section 8.1">8.1</a>
21412148
<li>&lt;media-feature&gt;, <a href=#typedef-media-feature title="section 3">3</a>
21422149
<li>media feature, <a href=#media-feature title="section 2.4">2.4</a>
@@ -2213,7 +2220,7 @@ <h2 class="no-num no-ref heading settled heading" id=property-index><span class=
22132220
<tr><th scope-row=""><a data-property="">pointer</a><td>none | coarse | fine<td><td>discrete
22142221
<tr><th scope-row=""><a data-property="">hover</a><td>none | on-demand | over<td><td>discrete
22152222
<tr><th scope-row=""><a data-property="">light-level</a><td>dim | normal | washed<td><td>discrete
2216-
<tr><th scope-row=""><a data-property="">scripting</a><td>none | enabled<td><td>discrete</table></div>
2223+
<tr><th scope-row=""><a data-property="">scripting</a><td>none | initial-only | enabled<td><td>discrete</table></div>
22172224

22182225

22192226
<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div class=issue>
@@ -2249,10 +2256,6 @@ <h2 class="no-num heading settled" id=issues-index><span class=content>Issues In
22492256
as discussed in http://lists.w3.org/Archives/Public/www-style/2013Oct/0672.html
22502257

22512258
<a href=#issue-406b4c65></a></div><div class=issue>
2252-
What about a value for "runs script on load, but not continuously",
2253-
like Opera Mini?
2254-
2255-
<a href=#issue-b8cd6af1></a></div><div class=issue>
22562259
We need a media feature (or set of media features) to detect the type of keyboard available.
22572260
It should be able to distinguish between full computer keyboards, phone dial pads, tv remotes, or virtual keyboards.
22582261
As an attempt at an exhaustive list is likely to fail,

mediaqueries/Overview.src.html

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,28 +1533,38 @@ <h3 id="scripting">
15331533

15341534
<pre class='descdef mq'>
15351535
Name: scripting
1536-
Value: none | enabled
1536+
Value: none | initial-only | enabled
15371537
For: @media
15381538
Type: discrete
15391539
</pre>
15401540

1541-
The 'scripting' media feature is used to query whether ECMAscript is supported
1542-
on the current document.
1541+
The 'scripting' media feature is used to query whether scripting languages,
1542+
such as JavaScript,
1543+
are supported on the current document.
15431544

15441545
<dl dfn-type=value dfn-for="@media/scripting">
15451546
<dt><dfn>enabled</dfn>
15461547
<dd>
1547-
Indicates that the user agent supports ECMAscript
1548+
Indicates that the user agent supports scripting of the page
15481549
and that support is active for the current document.
15491550

1551+
<dt><dfn>initial-only</dfn>
1552+
<dd>
1553+
Indicates that scripting is enabled during the initial page load,
1554+
but is not supported afterwards.
1555+
Examples are printed pages,
1556+
or pre-rendering network proxies
1557+
that render a page on a server
1558+
and send a nearly-static version of the page to the user.
1559+
15501560
<dt><dfn>none</dfn>
15511561
<dd>
15521562
Indicates that the user agent will not run scripts for this document;
1553-
either it doesn't support ECMAScript,
1563+
either it doesn't support a scripting language,
15541564
or the support isn't active for the current document.
15551565
</dl>
15561566

1557-
Some user agents have the ability to turn off ECMAscript support on a per script basis or per domain basis,
1567+
Some user agents have the ability to turn off scripting support on a per script basis or per domain basis,
15581568
allowing some, but not all, scripts to run in a particular document.
15591569
The 'scripting' media feature does not allow fine grained detection of which script is allowed to run.
15601570
In this scenario, the value of the 'scripting' media feature should be ''scripting/enabled''
@@ -1563,10 +1573,6 @@ <h3 id="scripting">
15631573

15641574
Note: A future level of CSS may extend this media feature to allow fine-grained detection of which script is allowed to run.
15651575

1566-
<p class='issue'>
1567-
What about a value for "runs script on load, but not continuously",
1568-
like Opera Mini?
1569-
15701576
<h2 id='assorted-issues'>
15711577
Assorted Issues</h2>
15721578

0 commit comments

Comments
 (0)