Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

Use capacitor plugin in web worker

$
0
0

@lhk wrote:

I’m offloading heavy calculations to a web worker. The web worker is all set up and integrated into my app.
But it can’t access capacitor plugins.

Importing any capacitor plugin causes the error message:
ReferenceError: window is not defined

Is there a way around this?

Some capacitor plugins probably really need access to window, or the dom. For example for storage.
But I’m actually only interested in calling custom native code.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>