WebIDLpedia

CharacterData interface

Definition

DOM Standard defines CharacterData


CharacterData includes NonDocumentTypeChildNode;
CharacterData includes ChildNode;
[Exposed=Window]
interface CharacterData : Node {
  attribute [LegacyNullToEmptyString] DOMString data;
  readonly attribute unsigned long length;
  DOMString substringData(unsigned long offset, unsigned long count);
  undefined appendData(DOMString data);
  undefined insertData(unsigned long offset, DOMString data);
  undefined deleteData(unsigned long offset, unsigned long count);
  undefined replaceData(unsigned long offset, unsigned long count, DOMString data);
};
Consolidated IDL (across mixin and partials)

[Exposed=Window]
interface CharacterData : Node {
  attribute [LegacyNullToEmptyString] DOMString data;
  readonly attribute unsigned long length;
  DOMString substringData(unsigned long offset, unsigned long count);
  undefined appendData(DOMString data);
  undefined insertData(unsigned long offset, DOMString data);
  undefined deleteData(unsigned long offset, unsigned long count);
  undefined replaceData(unsigned long offset, unsigned long count, DOMString data);
  readonly attribute Element? previousElementSibling;
  readonly attribute Element? nextElementSibling;
  [CEReactions, Unscopable] undefined before((Node or TrustedScript or DOMString)... nodes);
  [CEReactions, Unscopable] undefined after((Node or TrustedScript or DOMString)... nodes);
  [CEReactions, Unscopable] undefined replaceWith((Node or TrustedScript or DOMString)... nodes);
  [CEReactions, Unscopable] undefined remove();
};

Referring IDL interfaces/dictionaries