Skip to content

Commit 9818b42

Browse files
tabatkinsfergald
authored andcommitted
[cssom][css-images][css-conditional] Re-up and apply the patch from w3c#473, switching CSS from interface to namespace. Closes w3c#437.
1 parent 67ce014 commit 9818b42

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

10001000
The CSS interface, and the supports() function
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
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
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 ElementSources interface
685685
The elementSources Map object provides this.
686686

687687
688-
partial interface CSS {
689-
[SameObject] readonly attribute Map elementSources;
688+
partial namespace CSS {
689+
// [SameObject] readonly attribute Map elementSources;
690690
};
691691
692692

693+
Issue(428): IDL namespaces don't support attributes yet.
694+
693695
Any entries in the elementSources map with a string key
694696
and a value that is an object providing a paint source
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 CSS.escape() Method {#the-css.escape()-method}
28132813
------------------------------------------------------
28142814

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

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

2824-
The escape(ident) method must return the result of invoking serialize an identifier 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 escape(ident) operation must return the result of invoking serialize an identifier of
28252832
ident.
28262833

28272834
@@ -2835,7 +2842,7 @@ The escape(ident) method must return the re
28352842
var element = document.querySelector('a[href="#' + CSS.escape(fragment) + '"]');
28362843
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 current global
28402847
28412848

0 commit comments

Comments
 (0)