Class: Browser::DOM::Text
- Inherits:
-
CharacterData
- Object
- Node
- CharacterData
- Browser::DOM::Text
- Defined in:
- opal/browser/dom/text.rb
Overview
Encapsulates a text node.
Direct Known Subclasses
Constant Summary
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 collapse
-
#whole ⇒ String
readonly
The whole text.
Attributes inherited from CharacterData
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, #value
Class Method Summary collapse
-
.create(*args) ⇒ Text
Create a new text node for the document.
Instance Method Summary collapse
- #inspect ⇒ Object
-
#split(offset) ⇒ Text
Split the text node at a given offset.
Methods inherited from CharacterData
#append, #delete, #insert, #replace, #substring
Methods inherited from Node
#<<, #==, #>>, #add_child, #add_next_sibling, #add_previous_sibling, #ancestors, #append_to, #blank?, #cdata?, #clear, #comment?, #content, #content=, #document?, #elem?, #fragment?, new, #parse, #path, #prepend_to, #remove, #remove_child, #replace, #text?, #traverse
Instance Attribute Details
#whole ⇒ String (readonly)
Returns the whole text.
16 17 18 |
# File 'opal/browser/dom/text.rb', line 16 def whole `#@native.wholeText` end |
Class Method Details
.create(*args) ⇒ Text
Create a new text node for the document.
8 9 10 |
# File 'opal/browser/dom/text.rb', line 8 def self.create(*args) $document.create_text(*args) end |
Instance Method Details
#inspect ⇒ Object
31 32 33 |
# File 'opal/browser/dom/text.rb', line 31 def inspect "#<DOM::Text: #{data}>" end |