Sha256: 6a1caf2fa70ff45a7cae51bb5adfe645dc6dce9ac91986257ef3cc4a5bc7453a
Contents?: true
Size: 602 Bytes
Versions: 1
Compression:
Stored size: 602 Bytes
Contents
module Browser class Screen include Native include DOM::Event::Target target {|value| Screen.new(value) if Native.is_a?(value, `window.Screen`) } alias_native :width alias_native :height def size Size.new(width, height) end alias_native :x, :top alias_native :y, :left def position Position.new(x, y) end alias_native :color_depth, :colorDepth alias_native :pixel_depth, :pixelDepth alias_native :orientation end class Window # Get the {Screen} for this window. # # @return [Screen] def screen Screen.new(`#@native.screen`) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
opal-browser-0.1.0.beta1 | opal/browser/screen.rb |