1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 import { GeckoViewActorParent } from "resource://gre/modules/GeckoViewActorParent.sys.mjs";
7 export class GeckoViewPrintDelegateParent extends GeckoViewActorParent {
10 this._browserStaticClone = null;
13 set browserStaticClone(staticClone) {
14 this._browserStaticClone = staticClone;
17 get browserStaticClone() {
18 return this._browserStaticClone;
22 // Removes static browser element from DOM that was made for window.print
23 this.browserStaticClone?.remove();
24 this.browserStaticClone = null;
28 if (this.browserStaticClone != null) {
29 this.eventDispatcher.sendRequest({
30 type: "GeckoView:DotPrintRequest",
31 canonicalBrowsingContextId: this.browserStaticClone.browsingContext.id,