reearth / quickjs-emscripten-sync

Provides a way to sync objects between browser and QuickJS
MIT License
64 stars 7 forks source link

Not possible to expose fetch? #5

Closed jtewright closed 2 years ago

jtewright commented 2 years ago

Hello,

This module has some really useful features on top of quickjs-emscripten, thank you!

In particular, I'm trying to enable fetch. Your docs describe how it's dangerous to expose it into the arena. However, it appears the arena doesn't support promises, which would mean fetch can never work, if I'm understanding correctly.

Is that right? Why do the docs talk about exposing fetch when promises don't work? Or am I missing something?

Thank you, Joseph

rot1024 commented 2 years ago

Already opened: #3

With Promise support, it would be possible to pass the fetch response to the QucikJS (whether it's secure or not).

rot1024 commented 2 years ago

v1.4 has been released and promises are supported.