Bug 1888590 - Mark some subtests on trusted-types-event-handlers.html as failing...
[gecko.git] / toolkit / actors / PrintingParent.sys.mjs
blob31b8c6bbc7892ce845a820964d5564443273aea2
1 /* vim: set ts=2 sw=2 sts=2 et tw=80: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 export class PrintingParent extends JSWindowActorParent {
7   receiveMessage(message) {
8     let browser = this.browsingContext.top.embedderElement;
10     if (message.name == "Printing:Error") {
11       browser.ownerGlobal.PrintUtils._displayPrintingError(
12         message.data.nsresult,
13         message.data.isPrinting,
14         browser
15       );
16     } else if (message.name == "Printing:Preview:CurrentPage") {
17       browser.setAttribute("current-page", message.data.currentPage);
18     }
20     return undefined;
21   }