Skip to content Skip to sidebar Skip to footer

Error Cloning Element From Scope While Using Angular And Web Workers

I have an Angular app and I'm trying to implement some functionality into a Web Worker. To achieve this I need to pass an object from the angular scope to the worker so it's proces

Solution 1:

Turns out the object I was trying to send had a call to a function inside, and as this document (https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#Things_that_don%27t_work_with_structured_clones) indicates, that's one of the things that are not supported on the message.

Removing the function from the object send fixed the error.

Post a Comment for "Error Cloning Element From Scope While Using Angular And Web Workers"