| 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 | |
| 995 | eventAccessors.createEventAccessor(DocumentImpl.prototype, "readystatechange"); |