All Questions
Tagged with web-worker html
293 questions
0
votes
0
answers
32
views
How to use [email protected] library for Clientside DOM manipulation in web worker?
I am currently try to optimize many-many html dom manipulation in frontend without using server due to small size of the server as well. I am interested to use this worker dom library tutorial to ...
0
votes
0
answers
30
views
How does spotify keep the track timer and controls synched across multiple browser windows?
I'm trying to make a localhost only webapp using Dash. I know things like electron exist for this, but I'm more comfortable with dash and pyinstaller for my internal application. I want to open ...
0
votes
1
answer
380
views
Is it possible to create shared worker from a string and to use it without sharing the worker URL?
Probably this is not possible but I would be glad to hear about alternatives.
I have a large JS script which I want to run in a SharedWorker, but without uploading it to a server before running (it's ...
2
votes
1
answer
749
views
Is Bitmaprenderer supposed to work on OffscreenCanvas in a webworker?
I'm experimenting with using OffscreenCanvas in webworkers and trying various strategies.
In my original code I'm drawing on multiple canvas elements (stacked on top of each other) sequentially in a ...
0
votes
1
answer
942
views
Preloading a “fetch” resource for use in a web worker
tl;dr Resources pre-loaded as
<link rel="preload" href="..." as="fetch" crossorigin="anonymous">
don’t seem to be used by a fetch call that occurs in a ...
0
votes
1
answer
179
views
Why am I keep getting CORS
I am trying to create a simple project on android using chatGPT help. According to what it said, I can offload js heavy work into different process, to reduce the UI thread usage. But it seems I keep ...
1
vote
1
answer
645
views
How to make a mobile browser play a list of audio files without stopping when the screen is locked?
I would like to have a web page being able to act like a music player.
The user enqueues a list of audio files (hosted on the server) and they start playing. When the first audio is over, the second ...
2
votes
1
answer
1k
views
Is web worker unavailable when cross-origin isolation is enabled
Here are my two files, test.js and test.php.
test.js:
console.log("test.js is loaded")
test.php:
<?php
header('Content-Type: text/html; charset=UTF-8');
//header('Cross-Origin-Embedder-...
4
votes
1
answer
613
views
How to create a module worker in javascript
I am working on a program that relies heavily on web workers. But I am unable to get them to function as required. This is just a minified example but the format is more or less similar.
I have 4 ...
0
votes
0
answers
1k
views
Importing inside a module web worker
I have an index.html file that has a script tag with type="module".
Inside this script tag, I create a simple module worker like so
// index.html
let processFrameWorker = new Worker(&...
0
votes
1
answer
109
views
Web Worker - Is it possible to subscribe / catch the init function from inside the Worker js?
When creating new Worker instance with a name, for example:
// index.js
const myWorker = new Worker('./worker.js', { name: 'myWorker' });
Is it possible to subscribe/catch the initialization from ...
1
vote
0
answers
330
views
How to trigger AMP script when in viewport?
Here is my implementation of counters using javascript on AMP page:
Frontend Screenshot:
JS:
<script id="counter-async" type="text/plain" target="amp-script">
...
1
vote
1
answer
54
views
How to deliver information to webworker when it requests it
I have a piece of code that needs to execute on a webworker which needs to get feedback from something in the main thread (basically a get operation from a KVS). Unfortunately, I cannot use local ...
0
votes
0
answers
236
views
Implementing JS WebWorkers Job Queue with worker termination
I'm trying to implement a job queue using web workers. The task is image decoding. Tasks will arrive at a rapid rate and take a small variable amount of time.
I wrote a simple queue spawning 4 workers ...
0
votes
1
answer
1k
views
How to reduce CPU usage of web worker HTML 5
I am using web worker (WW) for an animation. I use WW instead of using setInterval to avoid problem setInterval is stopped when tab is in active. But the WW seems to use so much CPU, it always take at ...