Method: Browser::DOM::Text.create

Defined in:
opal/browser/dom/text.rb

.create(content) ⇒ Text

Create a new text node for the document.

Parameters:

  • content (String)

    the text content

Returns:



9
10
11
# File 'opal/browser/dom/text.rb', line 9

def self.create(content)
  $document.create_text(content)
end