rfd icon indicating copy to clipboard operation
rfd copied to clipboard

Doesn't work in web workers

Open temeddix opened this issue 2 years ago • 0 comments

On wasm32 target, the file dialog doesn't work when exeucted from a web worker, not the main thread.

image

I think this problem needs a hand, because running Rust code in web workers is a common situation. Though window is not defined in web workers, there is still FileReader API that it is still possible to be used.

https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Functions_and_classes_available_to_workers https://developer.mozilla.org/en-US/docs/Web/API/FileReader

temeddix avatar Oct 24 '23 12:10 temeddix