Method: Browser::DOM::Text#split

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

#split(offset) ⇒ Text

Split the text node at a given offset.

Parameters:

  • offset (Integer)

    the offset where to split the text node

Returns:

  • (Text)

    the newly created text node

See Also:



28
29
30
# File 'opal/browser/dom/text.rb', line 28

def split(offset)
  DOM(`#@native.splitText(offset)`)
end