1

I'm working with the File System Access API and I have to send a FileSystemDirectoryHandle calling a postMessage(), according to this article it seems to be possible

File handles are serializable, which means that you can save a file handle to IndexedDB, or call postMessage() to send them between the same top-level origin.

I made many try but... noway

In this question @DenverCoder9 proposes a working example for the indexedDb but I can't find anything for the postMessage

Thanks, Davide

1 Answer 1

0

According to this fixed bug transferring file handles via postMessage() is implemented and should work, however, only for same-origin contexts. If it doesn’t work, probably your origins are different.

Sign up to request clarification or add additional context in comments.

1 Comment

Ok, thank you, but just a question, the structured cloning algorithm is also used in indexedDb, do you know why it works in that case?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.