Closed deepbhavsar closed 2 years ago
Hi, have you imported the script file using JsIsolatedWorker.importScripts
first before running the function?
Edit:
The main problem actually comes from calling the document
since it's not available on Web Workers. reference
Closing this as this is not the package's issue itself.
I am creating the element using the
document.createElement('input')
inside the JS function. I am calling that function using theJsIsolatedWorker().run(functionName: 'alertMessage',arguments: '100')
It is giving me error:This is my JS function. I am getting image using input type=file. Plan is to return file path from this function.
Calling this function using:
Error: ReferenceError: document is not defined.
Let me know the correct way or require to make changes into current code. Thanks