|
|
@ -14,12 +14,6 @@ external interface StylePropertyString: StylePropertyValue |
|
|
|
inline fun StylePropertyValue(value: String): StylePropertyString = value.unsafeCast<StylePropertyString>() |
|
|
|
inline fun StylePropertyValue(value: String): StylePropertyString = value.unsafeCast<StylePropertyString>() |
|
|
|
inline fun StylePropertyValue(value: Number): StylePropertyNumber = value.unsafeCast<StylePropertyNumber>() |
|
|
|
inline fun StylePropertyValue(value: Number): StylePropertyNumber = value.unsafeCast<StylePropertyNumber>() |
|
|
|
|
|
|
|
|
|
|
|
fun StylePropertyValue.asString(): String? = if (jsTypeOf(this) == "string") this.unsafeCast<String>() else null |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun StylePropertyValue.asNumber(): Number? = if (jsTypeOf(this) == "number") this.unsafeCast<Number>() else null |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun StylePropertyValue.asCSSStyleValue(): CSSStyleValue? = if (jsTypeOf(this) == "object") this.unsafeCast<CSSStyleValue>() else null |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
external interface CSSStyleValue: StylePropertyValue { |
|
|
|
external interface CSSStyleValue: StylePropertyValue { |
|
|
|
override fun toString(): String |
|
|
|
override fun toString(): String |
|
|
|
} |
|
|
|
} |
|
|
|