Replies: 1 comment 5 replies
-
The way I usually figure these things out is to start by writing up a JS example and then translating it to I'm happy to look into this for you if you can provide me with an equal working JS example that I would use to debug this. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the Bug
Hello, I'm trying to use the FileSystemDirectoryHandle methods for accessing entries or keys and I'm not having much success. In my code I've tried tried accessing the values from the async iterators basically as described here (#4054) but I never seem to get the desired objects back from the promises.
Steps to Reproduce
Here is the code I'm using. In this instance it is inside of a web worker but I see the same behavior when running on the main thread.
If applicable, add a link to a test case (as a zip file or link to a repository we can clone).
Expected Behavior
I would expect to get back a JsValue that has the key, value pair described by the MDN docs at https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/entries
Actual Behavior
The JsValue returned either has the form:
JsValue(Object({"done":true}))
or
JsValue(Object({"value":undefined}))
If applicable, add screenshots to help explain your problem.
Additional Context
I realize it's possible that I'm completely misunderstanding how the API is supposed to work, so any help would be greatly appreciated!
Edited to add:
I have tried js casting the object to various forms. When trying to cast to a Map, naturally it fails, but the value printed in the stack trace does seem to contain a key and a value resembling the expected object, but the done property is marked as false.
Beta Was this translation helpful? Give feedback.
All reactions