--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/005C24B2-1D79-47CC-A291-D7A6B749582F%40callow.im.
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/1ECB6FF7-0049-4F3B-93AB-0CDD0879A908%40callow.im.
Is is possible to use a typed array created on HEAP8 with XMLHttpRequest as the destination for the incoming data?
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/66D3C2D4-C9C8-4665-85F2-0B8EAE8882C6%40callow.im.
On Jul 14, 2020, at 8:37, 'Sam Clegg' via emscripten-discuss <emscripte...@googlegroups.com> wrote:On Mon, Jul 13, 2020 at 6:43 PM キャロウ マーク <git...@callow.im> wrote:Is is possible to use a typed array created on HEAP8 with XMLHttpRequest as the destination for the incoming data?I don't think so no. IIRC XMLHttpRequest API pre-dates the typed array APIs.
Hi,
I'm not sure what's your use case is, it might help.
Cheers!
Beuc
On Jul 14, 2020, at 12:00, Beuc <be...@beuc.net> wrote:One optimization I did for RenPyWeb was importing XMLHttpRequest's buffer into the filesystem (FS):XMLHttpRequest most definitely supports receiving responses into ArrayBuffers. You set responseType=‘arrayBuffer’. However now I look more closely at the API there doesn’t seem to be any way to provide it with the destination ArrayBuffer. It looks like XMLHttpRequest always creates it itself which makes my question moot.
https://github.com/renpy/renpy/blob/8b0d3dd4986a5a8656b3a5ad634c62bd52b1afbd/renpy/webloader.py#L64
FS.writeFile(path, new Uint8Array(xhr.response), {canOwn:true});I'm not sure what's your use case is, it might help.