MCPcopy
hub / github.com/jsdom/jsdom / _cloneDocument

Method _cloneDocument

lib/jsdom/living/nodes/Document-impl.js:979–992  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

977 // Needed to ensure that the resulting document has the correct prototype chain:
978 // https://dom.spec.whatwg.org/#concept-node-clone says "that implements the same interfaces as node".
979 _cloneDocument() {
980 const copy = documents.createImpl(
981 this._globalObject,
982 {
983 contentType: this.contentType,
984 encoding: this._encoding,
985 parsingMode: this._parsingMode
986 }
987 );
988
989 copy._URL = this._URL;
990 copy._origin = this._origin;
991 return copy;
992 }
993}
994
995eventAccessors.createEventAccessor(DocumentImpl.prototype, "readystatechange");

Callers 1

node.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected