[epiphany/pgriffis/web-extension/runtime-send-message: 8/9] WebExtensions: Stub out permissions API




commit 1eb89fdc861bacb225eeaf7623d72f0b30d6c10d
Author: Patrick Griffis <pgriffis igalia com>
Date:   Thu Jun 2 12:37:13 2022 -0500

    WebExtensions: Stub out permissions API

 embed/web-process-extension/resources/js/webextensions.js | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/embed/web-process-extension/resources/js/webextensions.js 
b/embed/web-process-extension/resources/js/webextensions.js
index c82b807f2..9fce51e47 100644
--- a/embed/web-process-extension/resources/js/webextensions.js
+++ b/embed/web-process-extension/resources/js/webextensions.js
@@ -84,3 +84,12 @@ window.browser.browserAction = {
 window.browser.windows = {
   WINDOW_ID_CURRENT: -2, /* Matches Firefox, used in tabs.c. */
 };
+
+window.browser.permissions = {
+    contains: function (...args) { return ephy_message ('permissions.contains', args); },
+    getAll: function (...args) { return ephy_message ('permissions.getAll', args); },
+    remove: function (...args) { return ephy_message ('permissions.remove', args); },
+    request: function (...args) { return ephy_message ('permissions.request', args); },
+    onAdded: new EphyEventListener (),
+    onRemoved: new EphyEventListener (),
+};
\ No newline at end of file


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]