Merge branch 'feature-fix-close-3' into develop

This commit is contained in:
Ximi1970
2022-07-13 21:30:53 +02:00
2 changed files with 1 additions and 20 deletions

View File

@@ -1,4 +1,4 @@
/// This is the important part. It implements the functions and events defined in schema.json.
// This is the important part. It implements the functions and events defined in schema.json.
// The variable must have the same name you've been using so far, "myapi" in this case.
var windowEvent = class extends ExtensionCommon.ExtensionAPI {
getAPI(context) {
@@ -41,12 +41,6 @@ var windowEvent = class extends ExtensionCommon.ExtensionAPI {
// This function is called if the extension is disabled or removed, or Thunderbird closes.
// We registered it with callOnClose, above.
console.log("windowEvent API closed");
// Unload the JSM we imported above. This will cause Thunderbird to forget about the JSM, and
// load it afresh next time `import` is called. (If you don't call `unload`, Thunderbird will
// remember this version of the module and continue to use it, even if your extension receives
// an update.) You should *always* unload JSMs provided by your extension.
Cu.unload(extension.getURL("modules/windowEvent.jsm"));
}
};

View File

@@ -1,13 +0,0 @@
var EXPORTED_SYMBOLS = ["windowEvent"];
var windowEvent = {
value : 0,
incValue: function() {
this.value++;
},
getValue: function() {
return this.value;
},
};
console.log("Loading windowEvent.jsm");