web-worker Questions

2

Solved

I have been reading through the Vite documentation for Web workers, and it mentioned importing a file using "Query Suffixes," which I have never encountered and am not sure what to search...
Pitiful asked 1/11, 2022 at 0:41

2

I'm trying to create an automated program by using javascript console only. I need to use setInterval to make a loop for my program. The relevant part of the code is just like this: refreshInte...
Disparage asked 14/7, 2016 at 12:13

3

Solved

I am trying to import json data from web worker using importScripts, the following error occurs. Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at (my:...
Anselm asked 22/6, 2014 at 7:45

4

Solved

Are there any synchronization primitives like Barriers, Semaphors, Locks, Monitors, ... available in JavaScript / Web Workers or is there some library available empowering me to make use of such th...
Hydrops asked 30/11, 2011 at 22:10

3

I can set the importmap type in a tag in the HTML file. But the web worker can not set access a dom element. How can I set importmap in it?
Cracow asked 7/1, 2023 at 17:32

2

Solved

Can I tell the Gunicorn to fail when one of the workers failed to boot? I don't want gunicorn to automatically handle and reload the worker for me, but I want it to fail not trying to launch worker...
Faultfinding asked 24/5, 2016 at 11:24

5

Following this example I wrote the following function: var rasterToVectorWorker = new Worker( "../../../services/canvas/rasterToVectorWorker.js" ); rasterToVectorWorker.postMessage("message"); ...
Wallacewallach asked 8/3, 2018 at 11:16

7

Solved

A WebWorker executes with a scope completely separate from the 'window' context of traditional JavaScript. Is there a standard way for a script to determine if it is, itself, being executed as a We...
Weighting asked 21/9, 2011 at 22:47

3

Solved

I am using this Web worker which has a Global variable declared in it. Can I access the same (Global variable in worker 1) in the newly spawned web worker(worker 2)? When I've tried using jQuery in...
Antenna asked 27/6, 2012 at 5:11

2

I'm trying to import a module in a web worker that imports another module and getting the following error Uncaught SyntaxError: Cannot use import statement outside a module. My web worker is import...
Nationwide asked 1/9, 2021 at 21:38

2

I want to transfer a file from a form to a webworker. In chrome i simple can use this code to transfer a FileList-Object: worker.postMessage(files: array_files); But with Firefox i get this erro...
Thane asked 26/9, 2014 at 8:56

3

Solved

I would like to convert an SVG to a PNG inside a Web Worker. My problem is, that the DOM is not accessible from within the Worker, so I cannot draw the SVG to a canvas or something like that.
Inaudible asked 19/4, 2016 at 8:40

3

Solved

What are the specific steps to add a SharedWorker to an @angular/cli >1.2-generated project. I would like the SharedWorker to be defined in TypeScript (with full/correct type-definitions editor ...
Madonnamadora asked 11/9, 2017 at 15:42

2

Solved

How should I structure a project that includes main thread (DOM) script, and workers? Eg: main.ts // This file must have DOM types, but not worker types. const worker = new Worker('worker.js'); ...
Anthea asked 29/5, 2019 at 8:54

5

Solved

I am developing a library which I want to host on a CDN. The library is going to be used on many different domains across multiple servers. The library itself contains one script (let's call it scr...
Stipulate asked 20/2, 2014 at 16:23

3

Solved

I'm using Webpack 5 for a project, and just tried to move some logic out into a WebWorker. Here's how I'm creating the worker: persistenceWorker = new Worker( new URL('app/engine/persistence/worke...
Toniatonic asked 28/7, 2022 at 18:15

3

Solved

I am using shared webworkers, I am not getting the errors from the worker. The worker error handler not returning any errors!. How can I Debug shared webworkers. var worker = new SharedWorker('Vul...
Wale asked 19/6, 2012 at 13:19

3

I've created a SvelteKit webapp that works great on my desktop in my local environment. I launch the browser/webserver with: npm run dev -- --open Now I've just deployed to Vercel. Everything work...
Obi asked 16/6, 2021 at 0:55

2

Solved

Recently I worked on a library that supports using workers for some heavy lifting. I found out that, at least on most online code editors (snippets/jsfiddle/codepen/glitch) I can't seem to load a ...
Catty asked 25/9, 2019 at 12:14

0

This seems fairly basic however I can't find an answer on here. The MDN official docs show that getting a notification to navigate back to the app should look like this: self.addEventListener(&quot...

3

I'm developing an angular library that perform strong computation operations. So I was interested in implementing the web worker in order to have a better user experience and let the complex operat...
Cynosure asked 17/7, 2019 at 9:29

2

Solved

I can't seem to be able to instantiate a web worker from a ES6 script file. MDN says it should be possible like this: const worker = new Worker('my-worker.js', {type:"module"}); That doesn't wor...
Seraphina asked 25/9, 2018 at 18:13

6

I am trying to get web workers up and running with Vue cli3 and I'm having trouble getting it to work. I want to use the following package, worker-loader (and not vue-worker), as it looks well ma...
Marshamarshal asked 29/8, 2018 at 21:39

2

I have a web worker that I want to write with TypeScript. The problem is Worker.postMessage - TypeScript assumes that every script will be loaded in the window context, and so expects Window.postM...
Latium asked 23/2, 2018 at 14:37

3

Solved

I've been trying to find out just how capable web workers are of distributing processor load. I've yet to find any demos that seem to be able to get my quad core 2600k to even 50%, let alone 100%. ...
Alvertaalves asked 8/8, 2012 at 19:8

© 2022 - 2025 — McMap. All rights reserved.