UNPKG

html-document

Version:

Partial implementation of document, HTMLElement for node

25 lines (22 loc) 721 B
import Node from './Node'; import ParentNode from './ParentNode'; /** * The DocumentFragment interface represents a minimal document object that has no parent. It is used as * a light-weight version of Document to store well-formed or potentially non-well-formed fragments of XML. * * @see https://developer.mozilla.org/en/docs/Web/API/DocumentFragment * @class DocumentFragment * @extends ParentNode */ export default class DocumentFragment extends ParentNode { /** * @inheritdoc */ get outerHTML() { return this.innerHTML; } } /** * @constant {number} Comment#nodeType */ Object.defineProperty(DocumentFragment.prototype, 'nodeType', { value: Node.DOCUMENT_FRAGMENT_NODE });