File tree 4 files changed +29
-0
lines changed
src/main/scala/org/scalajs/dom
4 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,7 @@ css[SO] type RuleList = raw.CSSRuleList
217
217
css[SO] type StyleDeclaration = raw.CSSStyleDeclaration
218
218
css[SO] type StyleRule = raw.CSSStyleRule
219
219
css[SO] type StyleSheet = raw.CSSStyleSheet
220
+ css[SO] def CSS = raw.CSS
220
221
css[SO] def Rule = raw.CSSRule
221
222
experimental/AbortController[JC] def abort(): Unit
222
223
experimental/AbortController[JC] val signal: AbortSignal
@@ -2592,6 +2593,8 @@ raw/CDATASection[JC] def splitText(offset: Int): Text
2592
2593
raw/CDATASection[JC] def substringData(offset: Int, count: Int): String
2593
2594
raw/CDATASection[JC] var textContent: String
2594
2595
raw/CDATASection[JC] def wholeText: String
2596
+ raw/CSS[JO] def supports(propertyName: String, value: String): Boolean
2597
+ raw/CSS[JO] def supports(supportCondition: String): Boolean
2595
2598
raw/CSSFontFaceRule[JC] var CHARSET_RULE: Int
2596
2599
raw/CSSFontFaceRule[JC] var FONT_FACE_RULE: Int
2597
2600
raw/CSSFontFaceRule[JC] var IMPORT_RULE: Int
Original file line number Diff line number Diff line change @@ -217,6 +217,7 @@ css[SO] type RuleList = raw.CSSRuleList
217
217
css[SO] type StyleDeclaration = raw.CSSStyleDeclaration
218
218
css[SO] type StyleRule = raw.CSSStyleRule
219
219
css[SO] type StyleSheet = raw.CSSStyleSheet
220
+ css[SO] def CSS = raw.CSS
220
221
css[SO] def Rule = raw.CSSRule
221
222
experimental/AbortController[JC] def abort(): Unit
222
223
experimental/AbortController[JC] val signal: AbortSignal
@@ -2592,6 +2593,8 @@ raw/CDATASection[JC] def splitText(offset: Int): Text
2592
2593
raw/CDATASection[JC] def substringData(offset: Int, count: Int): String
2593
2594
raw/CDATASection[JC] var textContent: String
2594
2595
raw/CDATASection[JC] def wholeText: String
2596
+ raw/CSS[JO] def supports(propertyName: String, value: String): Boolean
2597
+ raw/CSS[JO] def supports(supportCondition: String): Boolean
2595
2598
raw/CSSFontFaceRule[JC] var CHARSET_RULE: Int
2596
2599
raw/CSSFontFaceRule[JC] var FONT_FACE_RULE: Int
2597
2600
raw/CSSFontFaceRule[JC] var IMPORT_RULE: Int
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ package org.scalajs.dom
4
4
* Short aliases of all the dom.CSSThing classes
5
5
*/
6
6
object css {
7
+ @ inline def CSS = raw.CSS
7
8
type FontFaceRule = raw.CSSFontFaceRule
8
9
type ImportRule = raw.CSSImportRule
9
10
type KeyframeRule = raw.CSSKeyframeRule
Original file line number Diff line number Diff line change @@ -12,6 +12,28 @@ package org.scalajs.dom.raw
12
12
import scala .scalajs .js
13
13
import scala .scalajs .js .annotation ._
14
14
15
+ @ js.native
16
+ @ JSGlobal
17
+ object CSS extends js.Object {
18
+
19
+ /**
20
+ * The CSS.supports() method returns a boolean value indicating if the browser supports a given CSS feature, or not.
21
+ * Allows to test the support of a pair property-value.
22
+ *
23
+ * MDN
24
+ */
25
+ def supports (propertyName : String , value : String ): Boolean = js.native
26
+
27
+ /**
28
+ * The CSS.supports() method returns a boolean value indicating if the browser supports a given CSS feature, or not.
29
+ * Takes one parameter matching the condition of @supports.
30
+ *
31
+ * MDN
32
+ */
33
+ def supports (supportCondition : String ): Boolean = js.native
34
+
35
+ }
36
+
15
37
/**
16
38
* A CSSStyleDeclaration is an interface to the declaration block returned by the
17
39
* style property of a cssRule in a stylesheet, when the rule is a CSSStyleRule.
You can’t perform that action at this time.
0 commit comments