reearth / quickjs-emscripten-sync

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

passing ModuleEvalOptions to evalCode #38

Open tim-field opened 2 months ago

tim-field commented 2 months ago

quickjs-emscripten supports a second options param to evalCode of type ModuleEvalOptions

https://github.com/justjake/quickjs-emscripten/tree/main?tab=readme-ov-file#safely-evaluate-javascript-code

https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSWASMModule.md#evalcode

Is there a way to specify these options when using quickjs-emscripten-sync ?

digipigeon commented 1 month ago

It looks like it would be pretty easy to add this as an extra param. Not sure if there would be any side effects anywhere else.

https://github.com/reearth/quickjs-emscripten-sync/blob/5936622195290bf051d0aa691012e0f443aebf33/src/index.ts#L98-L105