Skip to content

Commit 8aa6498

Browse files
committed
[cssom][css-images][css-conditional] Re-up and apply the patch from #473, switching CSS from interface to namespace. Closes #437.
1 parent 59c7407 commit 8aa6498

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

css-conditional-3/Overview.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -999,12 +999,12 @@ interface CSSDocumentRule : CSSConditionRule {
999999
<h3 id='the-css-interface'>
10001000
The <code>CSS</code> interface, and the <code title=''>supports()</code> function</h3>
10011001

1002-
The {{CSS}} interface holds useful CSS-related functions that do not belong elsewhere.
1002+
The {{CSS}} namespace holds useful CSS-related functions that do not belong elsewhere.
10031003

10041004
<pre class='idl'>
1005-
partial interface CSS {
1006-
static boolean supports(CSSOMString property, CSSOMString value);
1007-
static boolean supports(CSSOMString conditionText);
1005+
partial namespace CSS {
1006+
boolean supports(CSSOMString property, CSSOMString value);
1007+
boolean supports(CSSOMString conditionText);
10081008
};
10091009
</pre>
10101010

css-images-4/Overview.bs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,11 +685,13 @@ Using Out-Of-Document Sources: the <code>ElementSources</code> interface</h4>
685685
The <a idl>elementSources</a> Map object provides this.
686686

687687
<pre class='idl'>
688-
partial interface CSS {
689-
[SameObject] readonly attribute Map elementSources;
688+
partial namespace CSS {
689+
// [SameObject] readonly attribute Map elementSources;
690690
};
691691
</pre>
692692

693+
Issue(428): IDL namespaces don't support attributes yet.
694+
693695
Any entries in the <a idl>elementSources</a> map with a string key
694696
and a value that is an object providing a <a>paint source</a>
695697
are made available to the ''element()'' function.

cssom-1/Overview.bs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,16 +2812,23 @@ Utility APIs {#utility-apis}
28122812
The <code>CSS.escape()</code> Method {#the-css.escape()-method}
28132813
------------------------------------------------------
28142814

2815-
The <code>CSS</code> interface holds useful CSS-related functions that do not belong elsewhere.
2815+
The <code>CSS</code> namespace holds useful CSS-related functions that do not belong elsewhere.
28162816

28172817
<pre class=idl>
28182818
[Exposed=Window]
2819-
interface CSS {
2820-
static CSSOMString escape(CSSOMString ident);
2819+
namespace CSS {
2820+
CSSOMString escape(CSSOMString ident);
28212821
};
28222822
</pre>
28232823

2824-
The <dfn method for=CSS>escape(<var>ident</var>)</dfn> method must return the result of invoking <a>serialize an identifier</a> of
2824+
Issue: This was previously specified as an IDL interface
2825+
that only held static methods.
2826+
Switching to an IDL namespace is *nearly* identical,
2827+
so it's expected that there won't be any compat concerns.
2828+
If any are discovered, please report
2829+
so we can consider reverting this change.
2830+
2831+
The <dfn method for=CSS>escape(<var>ident</var>)</dfn> operation must return the result of invoking <a>serialize an identifier</a> of
28252832
<var>ident</var>.
28262833

28272834
<div class=example>
@@ -2835,7 +2842,7 @@ The <dfn method for=CSS>escape(<var>ident</var>)</dfn> method must return the re
28352842
<pre>var element = document.querySelector('a[href="#' + CSS.escape(fragment) + '"]');</pre>
28362843
</div>
28372844

2838-
Specifications that define static functions on the {{CSS}} interface and want to
2845+
Specifications that define operations on the {{CSS}} namespace and want to
28392846
store some state should store the state on the <a spec=html>current global
28402847
object</a>'s <a spec=html>associated <code>Document</code></a>.
28412848
<!-- https://github.com/w3c/csswg-drafts/issues/180 -->

0 commit comments

Comments
 (0)