CharacterData.insertData()

The insertData() method of the CharacterData interface inserts the provided data into this CharacterData Node's current data, at the provided offset from the start of the existing data. The provided data is spliced into the existing data.

Syntax

  characterData.insertData(offset, data)

Parameters

offset

The offset number of characters to insert the provided data at.

data

The data to insert to the given CharacterData object.

Return value

undefined.

Specifications

Specification
DOM Standard (DOM)
# dom-characterdata-insertdata

Browser compatibility

BCD tables only load in the browser