[epiphany/pgriffis/web-extension/background-page] WebExtensions: runtime.getBackgroundPage() should return a Promise




commit 334656b07b0ca5aab7cabe59f519e708e1044d1f
Author: Patrick Griffis <pgriffis igalia com>
Date:   Wed Jun 8 17:08:59 2022 -0500

    WebExtensions: runtime.getBackgroundPage() should return a Promise

 embed/web-process-extension/resources/js/webextensions.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/embed/web-process-extension/resources/js/webextensions.js 
b/embed/web-process-extension/resources/js/webextensions.js
index db4d9d08c..a56062a2a 100644
--- a/embed/web-process-extension/resources/js/webextensions.js
+++ b/embed/web-process-extension/resources/js/webextensions.js
@@ -77,9 +77,8 @@ window.browser.runtime.setUninstallURL = function (...args) { return ephy_messag
 window.browser.runtime.onInstalled = new EphyEventListener ();
 window.browser.runtime.onMessageExternal = new EphyEventListener ();
 window.browser.runtime.sendNativeMessage = function (...args) { return ephy_message 
('runtime.sendNativeMessage', args); };
-window.browser.runtime.getBackgroundPage = window.browser.extension.getBackgroundPage;
 Object.defineProperty(window.browser.runtime, 'lastError', { get: function() { return 
window.browser.extension.lastError; } });
-
+window.browser.runtime.getBackgroundPage = function () { return Promise.resolve 
(window.browser.extension.getBackgroundPage ()) };
 
 window.browser.pageAction = {
     setIcon: function (...args) { return ephy_message ('pageAction.setIcon', args); },


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