Sha256: 993bb4b3a409c82accf54e1981aa38b995db5e42c27b24ef51f63e0d9a291d38

Contents?: true

Size: 371 Bytes

Versions: 5

Compression:

Stored size: 371 Bytes

Contents

module Browser; module DOM; class Element < Node

class Textarea < Element
  def_selector "textarea"

  def value
    %x{
      if (#@native.value == "") {
        return nil;
      }
      else {
        return #@native.value;
      }
    }
  end

  def value=(value)
    `#@native.value = #{value}`
  end

  def clear
    `#@native.value = ''`
  end
end

end; end; end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
atome-opal-browser-0.3.9.5 opal/browser/dom/element/textarea.rb
opal-browser-0.3.3 opal/browser/dom/element/textarea.rb
opal-browser-0.3.2 opal/browser/dom/element/textarea.rb
opal-browser-0.3.1 opal/browser/dom/element/textarea.rb
opal-browser-0.3.0 opal/browser/dom/element/textarea.rb