1
2
3
4
5
6
7
8
|
// Background
"use strict";
function showError (e) {
console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
}
|
|
|
1
2
3
4
5
6
7
8
|
// Background
"use strict";
function showError (e) {
console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
}
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
console.log("Unknown command: " + e.data[0]);
}
}
catch (e) {
showError(e);
}
};
xGCEWorker.postMessage(["init", {sExtensionPath: browser.extension.getURL("."), sOptions: "", sContext: "Firefox"}]);
/*
Messages from the extension (not the Worker)
*/
function handleMessage (oRequest, xSender, sendResponse) {
|
|
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
console.log("Unknown command: " + e.data[0]);
}
}
catch (e) {
showError(e);
}
};
xGCEWorker.start();
xGCEWorker.postMessage(["init", {sExtensionPath: browser.extension.getURL("."), sOptions: "", sContext: "Firefox"}]);
/*
Messages from the extension (not the Worker)
*/
function handleMessage (oRequest, xSender, sendResponse) {
|
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
case "conjugueur_tab":
xConjTab = browser.tabs.create({
url: browser.extension.getURL("panel/conjugueur.html"),
pinned: true
});
xConjTab.then(onCreated, onError);
break;
}
});
async function newwin () {
console.log("Async on");
const getActive = browser.tabs.query({ currentWindow: true, active: true, });
const xWindowInfo = await browser.windows.getLastFocused();
|
|
|
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
case "conjugueur_tab":
xConjTab = browser.tabs.create({
url: browser.extension.getURL("panel/conjugueur.html"),
pinned: true
});
xConjTab.then(onCreated, onError);
break;
}
});
async function newwin () {
console.log("Async on");
const getActive = browser.tabs.query({ currentWindow: true, active: true, });
const xWindowInfo = await browser.windows.getLastFocused();
|