func CSSRuleListFromJS(value js.Wrapper) *CSSRuleList {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &CSSRuleList{}
	ret.Value_JS = input
	return ret
}
CSSRuleListFromJS is casting a js.Wrapper into CSSRuleList.
package cssom
import "syscall/js"
import (
	"github.com/gowebapi/webapi/css/typedom"
)
func unused(value interface{}) {
}
type Union struct {
	Value js.Value
}
func (u *Union) JSValue() js.Value {
	return u.Value
}
func UnionFromJS(value js.Value) *Union {
	return &Union{Value: value}
}
type CSSGroupingRule struct {
	CSSRule
}
func CSSGroupingRuleFromJS(value js.Wrapper) *CSSGroupingRule {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &CSSGroupingRule{}
	ret.Value_JS = input
	return ret
}
func (_this *CSSGroupingRule) CssRules() *CSSRuleList {
	var ret *CSSRuleList
	value := _this.Value_JS.Get("cssRules")
	ret = CSSRuleListFromJS(value)
	return ret
}
func (_this *CSSGroupingRule) InsertRule(rule string, index *uint) (_result uint) {
	var (
		_args [2]interface{}
		_end  int
	)
	_p0 := rule
	_args[0] = _p0
	_end++
	if index != nil {
		var _p1 interface{}
		if index != nil {
			_p1 = *(index)
		} else {
			_p1 = nil
		}
		_args[1] = _p1
		_end++
	}
	_returned := _this.Value_JS.Call("insertRule", _args[0:_end]...)
	var (
		_converted uint  
	)
	_converted = (uint)((_returned).Int())
	_result = _converted
	return
}
func (_this *CSSGroupingRule) DeleteRule(index uint) {
	var (
		_args [1]interface{}
		_end  int
	)
	_p0 := index
	_args[0] = _p0
	_end++
	_this.Value_JS.Call("deleteRule", _args[0:_end]...)
	return
}
type CSSImportRule struct {
	CSSRule
}
func CSSImportRuleFromJS(value js.Wrapper) *CSSImportRule {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &CSSImportRule{}
	ret.Value_JS = input
	return ret
}
func (_this *CSSImportRule) Href() string {
	var ret string
	value := _this.Value_JS.Get("href")
	ret = (value).String()
	return ret
}
func (_this *CSSImportRule) Media() *MediaList {
	var ret *MediaList
	value := _this.Value_JS.Get("media")
	ret = MediaListFromJS(value)
	return ret
}
func (_this *CSSImportRule) StyleSheet() *CSSStyleSheet {
	var ret *CSSStyleSheet
	value := _this.Value_JS.Get("styleSheet")
	ret = CSSStyleSheetFromJS(value)
	return ret
}
type CSSMarginRule struct {
	CSSRule
}
func CSSMarginRuleFromJS(value js.Wrapper) *CSSMarginRule {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &CSSMarginRule{}
	ret.Value_JS = input
	return ret
}
func (_this *CSSMarginRule) Name() string {
	var ret string
	value := _this.Value_JS.Get("name")
	ret = (value).String()
	return ret
}
func (_this *CSSMarginRule) Style() *CSSStyleDeclaration {
	var ret *CSSStyleDeclaration
	value := _this.Value_JS.Get("style")
	ret = CSSStyleDeclarationFromJS(value)
	return ret
}
type CSSNamespaceRule struct {
	CSSRule
}
func CSSNamespaceRuleFromJS(value js.Wrapper) *CSSNamespaceRule {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &CSSNamespaceRule{}
	ret.Value_JS = input
	return ret
}
func (_this *CSSNamespaceRule) NamespaceURI() string {
	var ret string
	value := _this.Value_JS.Get("namespaceURI")
	ret = (value).String()
	return ret
}
func (_this *CSSNamespaceRule) Prefix() string {
	var ret string
	value := _this.Value_JS.Get("prefix")
	ret = (value).String()
	return ret
}
type CSSPageRule struct {
	CSSGroupingRule
}
func CSSPageRuleFromJS(value js.Wrapper) *CSSPageRule {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &CSSPageRule{}
	ret.Value_JS = input
	return ret
}
func (_this *CSSPageRule) SelectorText() string {
	var ret string
	value := _this.Value_JS.Get("selectorText")
	ret = (value).String()
	return ret
}
func (_this *CSSPageRule) SetSelectorText(value string) {
	input := value
	_this.Value_JS.Set("selectorText", input)
}
func (_this *CSSPageRule) Style() *CSSStyleDeclaration {
	var ret *CSSStyleDeclaration
	value := _this.Value_JS.Get("style")
	ret = CSSStyleDeclarationFromJS(value)
	return ret
}
type CSSRule struct {
	Value_JS js.Value
}
func (_this *CSSRule) JSValue() js.Value {
	return _this.Value_JS
}
func CSSRuleFromJS(value js.Wrapper) *CSSRule {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &CSSRule{}
	ret.Value_JS = input
	return ret
}
const (
	STYLE_RULE               int = 1
	CHARSET_RULE             int = 2
	IMPORT_RULE              int = 3
	MEDIA_RULE               int = 4
	FONT_FACE_RULE           int = 5
	PAGE_RULE                int = 6
	MARGIN_RULE              int = 9
	NAMESPACE_RULE           int = 10
	KEYFRAMES_RULE           int = 7
	KEYFRAME_RULE            int = 8
	SUPPORTS_RULE            int = 12
	COUNTER_STYLE_RULE       int = 11
	VIEWPORT_RULE            int = 15
	FONT_FEATURE_VALUES_RULE int = 14
	FONT_PALETTE_VALUES_RULE int = 15
)
func (_this *CSSRule) Type() int {
	var ret int
	value := _this.Value_JS.Get("type")
	ret = (value).Int()
	return ret
}
func (_this *CSSRule) CssText() string {
	var ret string
	value := _this.Value_JS.Get("cssText")
	ret = (value).String()
	return ret
}
func (_this *CSSRule) SetCssText(value string) {
	input := value
	_this.Value_JS.Set("cssText", input)
}
func (_this *CSSRule) ParentRule() *CSSRule {
	var ret *CSSRule
	value := _this.Value_JS.Get("parentRule")
	if value.Type() != js.TypeNull && value.Type() != js.TypeUndefined {
		ret = CSSRuleFromJS(value)
	}
	return ret
}
func (_this *CSSRule) ParentStyleSheet() *CSSStyleSheet {
	var ret *CSSStyleSheet
	value := _this.Value_JS.Get("parentStyleSheet")
	if value.Type() != js.TypeNull && value.Type() != js.TypeUndefined {
		ret = CSSStyleSheetFromJS(value)
	}
	return ret
}
type CSSRuleList struct {
	Value_JS js.Value
}
func (_this *CSSRuleList) JSValue() js.Value {
	return _this.Value_JS
}