Class: DOM::Text
Overview
Text
Instance Attribute Summary
Attributes included from Events
Instance Method Summary collapse
-
#initialize(data) ⇒ Text
constructor
Initializes the text node with the given data.
Methods inherited from NODE
#<<, #<=>, #==, #>>, #children, #dup, #dup!, #empty, #empty?, from_node, get_element, #index, #insert_before, #normalize!, #parent, #parent_node, #remove, #remove!, #text, #text=
Methods included from Events
#add_listener, #delegate, #off, #old_trigger, #on, #on!, #remove_listeners, #trigger
Constructor Details
#initialize(data) ⇒ Text
Initializes the text node with the given data
7 8 9 |
# File 'opal/fron/dom/text.rb', line 7 def initialize(data) @el = `typeof #{data} === 'string'` ? `document.createTextNode(#{data})` : data end |