mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
ExtensionContext in Extension.jsm has |extension| as an instance member, so use it instead of passing |extension| to registerSchemaAPI's callback. And to make sure that this pattern also works in content processes, move the |extension| member to BaseContext. MozReview-Commit-ID: BgsGGCPQxJR --HG-- extra : rebase_source : 7aa9fb7a53e057e8d3d8c477bd6821f8344c571a
11 lines
212 B
JavaScript
11 lines
212 B
JavaScript
"use strict";
|
|
|
|
extensions.registerSchemaAPI("idle", context => {
|
|
return {
|
|
idle: {
|
|
queryState: function(detectionIntervalInSeconds) {
|
|
return Promise.resolve("active");
|
|
},
|
|
},
|
|
};
|
|
});
|