Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Error: This script should only be loaded in a browser extension. when importing bridge in the window context #7

Closed
dmaretskyi opened this issue Oct 23, 2020 · 6 comments

Comments

@dmaretskyi
Copy link
Contributor

Error: This script should only be loaded in a browser extension.

Errors is thrown from webextension-polyfill when trying to import bridge in the window context.

Using Chrome Version 86.0.4240.111

@zikaari
Copy link
Owner

zikaari commented Oct 23, 2020

The very thing that I skip testing, is the thing that fails. Will separate the window context messaging hooks into a separate file. How blocked are you?

@dmaretskyi
Copy link
Contributor Author

I'm currently using version 2, it's working perfectly for us

@pakholeung37
Copy link

window(like inject script) still can not call Bridge.setNamespace.

@zikaari
Copy link
Owner

zikaari commented Jul 11, 2021

For now can you guys try using version 2.2.0 of this package? I'll work on a fix in the meantime.

@zikaari
Copy link
Owner

zikaari commented Jun 29, 2022

Fixed in serversideup/webext-bridge#24

Please help us expedite the merge and release by reviewing the PR and testing the code locally on your system to make sure it's all good.

@zikaari
Copy link
Owner

zikaari commented Apr 6, 2023

Fixed as part of webext-bridge@6.0.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants