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

Instance Attribute Details

#style_sheetsArray<CSS::StyleSheet> (readonly) Also known as: stylesheets

Returns the style sheets for the document.

Returns:



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