Sha256: f44c6cf144bc61c838c8511b3cc7387fa481fe6f5fdc589174b638d349c8e21d
Contents?: true
Size: 846 Bytes
Versions: 2
Compression:
Stored size: 846 Bytes
Contents
module Browser; module DOM; class Element < Node class Size include Native::Wrapper attr_reader :element # @private def initialize(element, *inc) @element = element @native = element.to_n @include = inc end # @!attribute width # @return [Integer] the element width alias_native :width, :offsetWidth def width=(value) @element.style[:width] = value end # @!attribute height # @return [Integer] the element height alias_native :height, :offsetHeight def height=(value) @element.style[:height] = value end # @!attribute client_width # @return [Integer] the content-box width of an element alias_native :client_width, :clientWidth # @!attribute client_height # @return [Integer] the content-box height of an element alias_native :client_height, :clientHeight end end; end; end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
opal-browser-0.3.5 | opal/browser/dom/element/size.rb |
opal-browser-0.3.4 | opal/browser/dom/element/size.rb |