Class: Browser::DOM::Element::Textarea

Inherits:
Browser::DOM::Element show all
Defined in:
opal/browser/dom/element/textarea.rb

Constant Summary

Constants inherited from Browser::DOM::Element

Img

Constants inherited from Node

Node::ATTRIBUTE_NODE, Node::CDATA_SECTION_NODE, Node::COMMENT_NODE, Node::DOCUMENT_FRAGMENT_NODE, Node::DOCUMENT_NODE, Node::DOCUMENT_TYPE_NODE, Node::ELEMENT_NODE, Node::ENTITY_NODE, Node::ENTITY_REFERENCE_NOCE, Node::NOTATION_NODE, Node::PROCESSING_INSTRUCTION_NODE, Node::TEXT_NODE

Instance Attribute Summary

Attributes inherited from Browser::DOM::Element

#attribute_nodes, #attributes, #class_name, #class_names, #height, #id, #offset, #position, #scroll, #size, #style!, #width, #window

Attributes inherited from Node

#child, #children, #document, #element_children, #first_element_child, #inner_html, #last_element_child, #name, #namespace, #next, #next_element, #node_type, #parent, #previous, #previous_element

Instance Method Summary collapse

Methods inherited from Browser::DOM::Element

#/, #=~, #[], #[]=, #add_class, #at, #at_css, #at_xpath, #blur, create, #css, #data, #focus, #focused?, #hide, #inner_dom, #inner_dom=, #inspect, new, #remove_attribute, #remove_class, #search, #show, #style, #toggle, #xpath

Methods included from Event::Target

#off, #on, #on!, #trigger, #trigger!

Methods inherited from Node

#<<, #==, #>>, #add_child, #add_next_sibling, #add_previous_sibling, #ancestors, #append_to, #blank?, #cdata?, #comment?, #content, #content=, #document?, #elem?, #fragment?, new, #parse, #path, #prepend_to, #remove, #remove_child, #replace, #text?, #traverse

Instance Method Details

#clearObject



19
20
21
# File 'opal/browser/dom/element/textarea.rb', line 19

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

#valueObject



4
5
6
7
8
9
10
11
12
13
# File 'opal/browser/dom/element/textarea.rb', line 4

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

#value=(value) ⇒ Object



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

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