diff --git a/toolkit/components/printing/content/printUtils.js b/toolkit/components/printing/content/printUtils.js index 6f7ead241ba..65d5fafd186 100644 --- a/toolkit/components/printing/content/printUtils.js +++ b/toolkit/components/printing/content/printUtils.js @@ -19,6 +19,10 @@ * the object that listens and responds to the messages that PrintUtils * sends. * + * This also means that 's that hope to use PrintUtils must have + * their type attribute set to either "content", "content-targetable", or + * "content-primary". + * * PrintUtils sends messages at different points in its implementation, but * their documentation is consolidated here for ease-of-access. * @@ -122,7 +126,9 @@ var PrintUtils = { * The remote that contains aWindow. This argument is * not necessary if aWindow came from a non-remote browser, but is * strictly required otherwise. This function will throw if aWindow - * comes from a remote browser and aBrowser is not provided. + * comes from a remote browser and aBrowser is not provided. This + * browser must have its type attribute set to "content", + * "content-targetable", or "content-primary". */ print: function (aWindow, aBrowser) { @@ -176,11 +182,14 @@ var PrintUtils = { * An object that defines the following functions: * * getPrintPreviewBrowser: - * Returns the to display the print preview in. + * Returns the to display the print preview in. This + * must have its type attribute set to "content", + * "content-targetable", or "content-primary". * * getSourceBrowser: * Returns the that contains the document being - * printed. + * printed. This must have its type attribute set to + * "content", "content-targetable", or "content-primary". * * getNavToolbox: * Returns the primary toolbox for this window. diff --git a/toolkit/components/viewsource/content/viewSource.js b/toolkit/components/viewsource/content/viewSource.js index a6dea499b34..2adbf442c68 100644 --- a/toolkit/components/viewsource/content/viewSource.js +++ b/toolkit/components/viewsource/content/viewSource.js @@ -335,9 +335,11 @@ var PrintPreviewListener = { browser = document.createElement("browser"); browser.setAttribute("id", "ppBrowser"); browser.setAttribute("flex", "1"); + browser.setAttribute("type", "content"); document.getElementById("appcontent"). insertBefore(browser, document.getElementById("FindToolbar")); } + return browser; }, getSourceBrowser: function () {