Bug 1373765 - Move jsonViewInitialized into JSONView.initialized. r=Honza

This commit is contained in:
Oriol 2017-06-16 11:31:00 -04:00
Родитель fdb38c21da
Коммит bcb63bdac7
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -100,6 +100,6 @@ define(function (require, exports, module) {
// Send notification event to the window. Can be useful for
// tests as well as extensions.
let event = new CustomEvent("JSONViewInitialized", {});
window.jsonViewInitialized = true;
JSONView.initialized = true;
window.dispatchEvent(event);
});

Просмотреть файл

@ -49,7 +49,7 @@ function addJsonViewTab(url, timeout = -1) {
// Resolve if the JSONView is fully loaded or wait
// for an initialization event.
if (content.window.wrappedJSObject.jsonViewInitialized) {
if (content.window.wrappedJSObject.JSONView.initialized) {
deferred.resolve(tab);
} else {
waitForContentMessage("Test:JsonView:JSONViewInitialized").then(() => {