Sha256: b92c3c2a06fc89eb8d8732d3f5eaed2bf7a6656bc655aef56bccdaa78b8f75c5
Contents?: true
Size: 472 Bytes
Versions: 2
Compression:
Stored size: 472 Bytes
Contents
module Browser; module DOM class Document < Element def active_element DOM(`#@native.activeElement`) end end class Element def show(what = :block) style[:display] = what end def hide style[:display] = :none end def toggle if style![:display] == :none show else hide end end def focus `#@native.focus()` end def blur `#@native.blur()` end def focused? `#@native.hasFocus` end end end; end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
opal-browser-0.2.0.beta1 | opal/browser/effects.rb |
opal-browser-0.1.0.beta1 | opal/browser/effects.rb |