chat/modules/hiddenWindow.jsm
author Clemens <clemens@gorilla-computing.de>
Mon, 12 Mar 2018 17:44:46 +0100
changeset 30466 9b22a733b765b9a50133661fdccba4e01c3d91de
parent 30204 1ac48db6177e9ea975af601c25770fc50db1b6dc
child 33542 985a367b6423f28e297d4c55d0256e741e91d225
permissions -rw-r--r--
Bug 321434 - Location does not appear in multiday view event box. r/a=philipp MozReview-Commit-ID: 4BbeOscF0ec

/* 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