[epiphany/pgriffis/web-extension-storage: 1/2] WebExtensions: Stub out some functions
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/pgriffis/web-extension-storage: 1/2] WebExtensions: Stub out some functions
- Date: Tue, 24 May 2022 16:26:20 +0000 (UTC)
commit 2b9dab1ddb9104284559980694054c9668db9764
Author: Patrick Griffis <pgriffis igalia com>
Date: Mon May 23 20:53:56 2022 -0500
WebExtensions: Stub out some functions
embed/web-process-extension/resources/js/webextensions.js | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/embed/web-process-extension/resources/js/webextensions.js
b/embed/web-process-extension/resources/js/webextensions.js
index b68c8c189..33985f922 100644
--- a/embed/web-process-extension/resources/js/webextensions.js
+++ b/embed/web-process-extension/resources/js/webextensions.js
@@ -28,6 +28,9 @@ window.browser.notifications = {
create: function (args, cb) { return ephy_message ('notifications.create', args, cb); },
};
+// browser.extension is defined in ephy-webextension-common.c
+window.browser.extension.getViews = function (...args) { return []; };
+
// browser.runtime is defined in webextensions-common.js
window.browser.runtime.getBrowserInfo = function (args, cb) { return ephy_message ('runtime.getBrowserInfo',
args, cb); };
window.browser.runtime.connectNative = function (args, cb) { return ephy_message ('runtime.connectNative',
args, cb); };
@@ -35,6 +38,9 @@ window.browser.runtime.openOptionsPage = function (args, cb) { return ephy_messa
window.browser.runtime.setUninstallURL = function (args, cb) { return ephy_message
('runtime.setUninstallURL', args, cb); };
window.browser.runtime.onInstalled = new EphyEventListener ();
window.browser.runtime.onMessageExternal = new EphyEventListener ();
+window.browser.runtime.sendNativeMessage = function (args) {
+ return new Promise ((resolve, reject) => { reject ('Unsupported API'); });
+};
window.browser.pageAction = {
setIcon: function (args, cb) { return ephy_message ('pageAction.setIcon', args, cb); },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]