Class: DOM::Text

Inherits:
NODE show all
Defined in:
opal/fron/dom/text.rb

Overview

Text

Instance Attribute Summary

Attributes included from Events

#listeners

Instance Method Summary collapse

Methods inherited from NODE

#<<, #<=>, #==, #>>, #children, #dup, #dup!, #empty, #empty?, fromNode, getElement, #index, #insertBefore, #normalize!, #parent, #parentNode, #remove, #remove!, #text, #text=

Methods included from Events

#addListener, #delegate, #off, #on, #on!, #removeListeners, #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