Steps to reproduce:
- Unzip and install the attached extension
- In a browser window, open a new tab but don't navigate to any pages yet
- Show the javascript console
- Open any webpage, such as https://kagi.com
Expected behavior:
The page's console should print the following output:
load event
Calling sendMessage()
Received promise, about to await result...
result:
done
Actual behavior:
The output never prints anything past "Received promise, about to await result..."
This extension functions correctly in both Firefox and Chrome.
More notes:
This is another test case demonstrating a difference in beheavior between Orion and Chrome / Firefox. In this case, content.js
monkey-patches Object.prototype and adds a new function to it. As a result, browser.runtime.sendMessage()
no longer works in Orion, and the listener in background.js
is never called. If you remove the line Object.prototype.monkeyPatch = function() {};
from content.js
then sendMessage()
works again.
As dubious as monkey-patching Object.prototype is, since this works in Firefox and Chrome and at least one significant browser extension uses this technique (KeePassXC-browser), this ought to work in Orion as well. It's also possible that other extensions do this sort of monkey-patching and will also be broken in Orion as a result.
Orion, OS version; hardware type:
Version 0.99.113.2-beta (WebKit 613.1.12)
macOS 10.14.6