Module: Browser::DOM::DocumentOrShadowRoot
- Included in:
- Document, ShadowRoot
- Defined in:
- opal/browser/dom/document_or_shadow_root.rb
Overview
Document and ShadowRoot have some methods and properties in common. This solution mimics how it's done in DOM.
Instance Attribute Summary collapse
-
#style_sheets ⇒ Array<CSS::StyleSheet>
(also: #stylesheets)
readonly
The style sheets for the document.
Instance Attribute Details
#style_sheets ⇒ Array<CSS::StyleSheet> (readonly) Also known as: stylesheets
Returns the style sheets for the document.
11 12 13 14 15 |
# File 'opal/browser/dom/document_or_shadow_root.rb', line 11 def style_sheets Native::Array.new(`#@native.styleSheets`) {|e| CSS::StyleSheet.new(e) } end |