Class: Sol::CSSStyleSheet
- Inherits:
-
Object
- Object
- Sol::CSSStyleSheet
- Defined in:
- lib/jx/jsstyle_sheet.rb
Overview
Instance Attribute Summary collapse
-
#jsvar ⇒ Object
readonly
Returns the value of attribute jsvar.
Instance Method Summary collapse
-
#disabled? ⇒ Boolean
———————————————————————————— Is a Boolean representing whether the current stylesheet has been applied or not.
-
#href ⇒ Object
———————————————————————————— Returns a DOMString representing the location of the stylesheet.
-
#initialize(index) ⇒ CSSStyleSheet
constructor
————————————————————————————.
-
#media ⇒ Object
———————————————————————————— Returns a MediaList representing the intended destination medium for style information.
-
#owner_node ⇒ Object
————————————————————————————.
-
#parent_style_sheet ⇒ Object
————————————————————————————.
-
#rules ⇒ Object
————————————————————————————.
-
#style_sheet? ⇒ Boolean
————————————————————————————.
-
#title ⇒ Object
————————————————————————————.
-
#type ⇒ Object
————————————————————————————.
Constructor Details
#initialize(index) ⇒ CSSStyleSheet
116 117 118 119 120 121 |
# File 'lib/jx/jsstyle_sheet.rb', line 116 def initialize(index) @jsvar = "css_style_sheet_#{SecureRandom.hex(8)}" p "init" B.eval("console.log(__style_sheets__[1].cssRules)") B.eval("var #{@jsvar} = __style_sheets__[#{index}]") end |
Instance Attribute Details
#jsvar ⇒ Object (readonly)
Returns the value of attribute jsvar.
110 111 112 |
# File 'lib/jx/jsstyle_sheet.rb', line 110 def jsvar @jsvar end |
Instance Method Details
#disabled? ⇒ Boolean
Is a Boolean representing whether the current stylesheet has been applied or not.
127 128 129 |
# File 'lib/jx/jsstyle_sheet.rb', line 127 def disabled? B.eval("#{@jsvar}.disabled") end |
#href ⇒ Object
Returns a DOMString representing the location of the stylesheet.
135 136 137 |
# File 'lib/jx/jsstyle_sheet.rb', line 135 def href B.eval("#{@jsvar}.href") end |
#media ⇒ Object
Returns a MediaList representing the intended destination medium for style information.
144 145 146 |
# File 'lib/jx/jsstyle_sheet.rb', line 144 def media B.eval("#{@jsvar}.media") end |
#owner_node ⇒ Object
152 153 154 |
# File 'lib/jx/jsstyle_sheet.rb', line 152 def owner_node B.eval("#{@jsvar}.ownerNode") end |
#parent_style_sheet ⇒ Object
160 161 162 |
# File 'lib/jx/jsstyle_sheet.rb', line 160 def parent_style_sheet B.eval("#{@jsvar}.parentStyleSheet") end |
#rules ⇒ Object
184 185 186 187 |
# File 'lib/jx/jsstyle_sheet.rb', line 184 def rules B.eval("#{@jsvar}.rules") # CSSRules.new(@jsvar) end |
#style_sheet? ⇒ Boolean
193 194 195 |
# File 'lib/jx/jsstyle_sheet.rb', line 193 def style_sheet? true end |
#title ⇒ Object
168 169 170 |
# File 'lib/jx/jsstyle_sheet.rb', line 168 def title B.eval("#{@jsvar}.title") end |
#type ⇒ Object
176 177 178 |
# File 'lib/jx/jsstyle_sheet.rb', line 176 def type B.eval("#{@jsvar}.type") end |