Skip to content

CharacterData

Generated from idl/dom.webidl when the site was built at 7aa23e2.

CharacterData is an interface in idl/dom.webidl, inheriting Node, exposed in Window. It includes NonDocumentTypeChildNode, ChildNode. What it does is on MDN; this page says what niso has of it.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
DOM Widely available No WPT tests WPT maps no test to it 14
attribute
attribute [LegacyNullToEmptyString] DOMString data;
int32_t niso_character_data_get_data(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_character_data_set_data(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
readonly attribute unsigned long length;
int32_t niso_character_data_get_length(niso_dom* dom, niso_handle self, uint32_t* out);
operation
DOMString substringData(unsigned long offset, unsigned long count);
int32_t niso_character_data_substring_data(niso_dom* dom, niso_handle self, uint32_t offset, uint32_t count, niso_str* out);
operation
undefined appendData(DOMString data);
int32_t niso_character_data_append_data(niso_dom* dom, niso_handle self, const char* data, size_t data_len);
operation
undefined insertData(unsigned long offset, DOMString data);
int32_t niso_character_data_insert_data(niso_dom* dom, niso_handle self, uint32_t offset, const char* data, size_t data_len);
operation
undefined deleteData(unsigned long offset, unsigned long count);
int32_t niso_character_data_delete_data(niso_dom* dom, niso_handle self, uint32_t offset, uint32_t count);
operation
undefined replaceData(unsigned long offset, unsigned long count, DOMString data);
int32_t niso_character_data_replace_data(niso_dom* dom, niso_handle self, uint32_t offset, uint32_t count, const char* data, size_t data_len);
attribute from NonDocumentTypeChildNode
readonly attribute Element? previousElementSibling;
int32_t niso_non_document_type_child_node_get_previous_element_sibling(niso_dom* dom, niso_handle self, niso_handle* out);
attribute from NonDocumentTypeChildNode
readonly attribute Element? nextElementSibling;
int32_t niso_non_document_type_child_node_get_next_element_sibling(niso_dom* dom, niso_handle self, niso_handle* out);
operation from ChildNode
undefined before((Node or DOMString)... nodes);
int32_t niso_child_node_before(niso_dom* dom, niso_handle self, const niso_node_or_string* nodes, size_t nodes_len);
operation from ChildNode
undefined after((Node or DOMString)... nodes);
int32_t niso_child_node_after(niso_dom* dom, niso_handle self, const niso_node_or_string* nodes, size_t nodes_len);
operation from ChildNode
undefined replaceWith((Node or DOMString)... nodes);
int32_t niso_child_node_replace_with(niso_dom* dom, niso_handle self, const niso_node_or_string* nodes, size_t nodes_len);
operation from ChildNode
undefined remove();
int32_t niso_child_node_remove(niso_dom* dom, niso_handle self);

Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.

  • afterHTML (HTML setter methods)
  • afterHTMLUnsafe (HTML setter methods)
  • beforeHTML (HTML setter methods)
  • beforeHTMLUnsafe (HTML setter methods)
  • replaceWithHTML (HTML setter methods)
  • replaceWithHTMLUnsafe (HTML setter methods)
  • streamAfterHTML (HTML streaming setters)
  • streamAfterHTMLUnsafe (HTML streaming setters)
  • streamBeforeHTML (HTML streaming setters)
  • streamBeforeHTMLUnsafe (HTML streaming setters)
  • streamReplaceWithHTML (HTML streaming setters)
  • streamReplaceWithHTMLUnsafe (HTML streaming setters)