Hi, 
>From your description I'm not really sure how your code looks like, but the 
Security Error, says `file://..` With modern browsers we are not allowed to 
require() code from a file-url, due to security concerns. So the best way 
is, to also add the library to the client as a plugin. Then you should be 
able to use the same require with the server and the client. 

But as I wrote a bit more code context will be needed. 

On Wednesday, June 26, 2024 at 2:37:33 PM UTC+2 James Mclellan wrote:

> Good morning all.
>
> I have a CPU-intensive data operation that I'm trying to spread across 
> multiple CPUs in TiddlyWiki using a Web Worker (
> https://developer.mozilla.org/en-US/docs/Web/API/Worker)
>
> I have created a server-side library module and a client-side library 
> module. The client-side constructor of the worker is supposed to contain a 
> URL to the server library 
>
> var w = new Worker("$:/core/modules/libraries/webworker-server.js");
>
> However, this generates an error "Security Error: Content at 
> file:///home/james/Desktop/Crunchy%20RPG/experiment.html may not load data 
> from 
> file:///home/james/Desktop/Crunchy%20RPG/$:/core/modules/libraries/webworker-server.js."
>
> Not sure how to reference the server library internal to the TiddlyWiki. 
> This works fine for require(..)
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3b8631b5-fc3d-4131-87f2-feb857fecbbcn%40googlegroups.com.

Reply via email to