Does fetch in Xd support the .blob() or .arrayBuffer() methods on the response body?



await fetch(url)

to get a png image from the web (which succeeds, as the resulting response has normal status (OK), content-length is 46653, etc.

Using .json() complains rightly that it’s not a json-formatted response, but .blob is undefined, and .arrayBuffer() just returns empty.

So I’m suspecting that Xd’s fetch isn’t a full implementation? Can you confirm?

This is a real problem if so.


blob is not supported currently. For fetching images, please consider using XHR for now. Here is an example!


Great, thanks!

Can you add those to the wish-list for fetch()?


blob support is coming soon! ref:


Great, thanks!

Also, what about ImageFill taking more than just a file ref or data: url? How about a binary blob as well, like what you’d get directly from fetching a url for a .png/.jpg/.gif?