Firefox Tomorrow

web api instance method

DocumentType: remove() method

View on MDN ↗

The DocumentType.remove() method removes a document’s doctype. If it is already detached from the document, calling remove() does nothing.

Syntax

remove()

Parameters

None.

Return value

None (undefined).

Examples

Using remove()

document.doctype; // "<!doctype html>'
document.doctype.remove();
document.doctype; // null

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also