You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a chrome extension project which has two folders, one is content-script which use dom
the other one is background which uses service worker
I would like to tell closure compiler which library/environment is used in each so that it give errors/warnings if I missused one of them
For example using window object or document.createElement in service woker should show an error
The text was updated successfully, but these errors were encountered:
Roughly the answer is to compile the 2 parts separately using different externs files (standard for the web page, worker externs only for the worker one). However, I don't have a handy list of which externs those are, and I suspect you're looking for a solution that compiles all of these things together.
Honestly, we've never spent any time trying to support this use-case. Sorry.
@zuhairtaha I am afraid Service Worker and Web Worker are two very different things. Let's start by getting this straight. Which one are you trying to use?
I have a chrome extension project which has two folders, one is
content-script
which usedom
the other one is
background
which usesservice worker
I would like to tell closure compiler which library/environment is used in each so that it give errors/warnings if I missused one of them
For example using
window
object ordocument.createElement
in service woker should show an errorThe text was updated successfully, but these errors were encountered: