Class: Browser::DOM::Element::Size

Inherits:
Object
  • Object
show all
Defined in:
opal/browser/dom/element/size.rb

Instance Attribute Summary collapse

Instance Attribute Details

#elementObject (readonly)

Returns the value of attribute element.



4
5
6
# File 'opal/browser/dom/element/size.rb', line 4

def element
  @element
end

#heightInteger

Returns the element height.

Returns:

  • (Integer)

    the element height



25
26
27
# File 'opal/browser/dom/element/size.rb', line 25

def height
  `#@native.offsetHeight`
end

#widthInteger

Returns the element width.

Returns:

  • (Integer)

    the element width



15
16
17
# File 'opal/browser/dom/element/size.rb', line 15

def width
  `#@native.offsetWidth`
end