chat/modules/hiddenWindow.jsm
author Philipp Kewisch <mozilla@kewis.ch>
Thu, 22 Feb 2018 21:48:52 +0100
changeset 30553 96aefde64d3b8eb4dc3843cf4c5c3747f00c02eb
parent 30204 1ac48db6177e9ea975af601c25770fc50db1b6dc
child 33542 985a367b6423f28e297d4c55d0256e741e91d225
permissions -rw-r--r--
Bug 1440587 - Move calProviderUtils to the cal.provider namespace - manual provider changes. r=MakeMyDay MozReview-Commit-ID: 2JU8zMeWKiy

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

this.EXPORTED_SYMBOLS = ["getHiddenHTMLWindow"];

ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");

XPCOMUtils.defineLazyGetter(this, "hiddenWindow", () =>
  Services.appShell.hiddenDOMWindow
);
#ifndef XP_MACOSX
function getHiddenHTMLWindow() { return hiddenWindow; }
#else
function getHiddenHTMLWindow() {
  let browser = hiddenWindow.document.getElementById("hiddenBrowser");
  return browser.docShell ? browser.contentWindow : hiddenWindow;
}
#endif