chrome.runtime is undefined in content script #80
-
I added the following into the index.ts in the src/content-script/index.ts file, and got error: chrome.runtime is undefined. What am I missing? window.addEventListener('messageFromAnotherVueProject', (event) => { |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I just tested, and see no problem accessing |
Beta Was this translation helpful? Give feedback.
-
I finally figured out, you cannot call index.ts more than one time. Otherwise, the 2nd time or 3rd time will cause the problem. |
Beta Was this translation helpful? Give feedback.
-
We're developing a new and improved browser extension template with exciting features like authentication, payment processing, and more. Your feedback is crucial to us! Please take a moment to fill out our feedback form and let us know if you would be interested in purchasing template, along with any features you would like to see.Thank you for your time and support! |
Beta Was this translation helpful? Give feedback.
I finally figured out, you cannot call index.ts more than one time. Otherwise, the 2nd time or 3rd time will cause the problem.