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




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

    WebExtensions: Stub out permissions API
    
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1122>

 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]