quickjs-go icon indicating copy to clipboard operation
quickjs-go copied to clipboard

Create class without eval

Open Marcisbee opened this issue 10 months ago • 1 comments

Is there an easy way to create a class programmatically without eval?

https://github.com/buke/quickjs-go/blob/787d3dba3741fa67bd77af8965e614fa7b7772c3/quickjs_test.go#L864-L872

Marcisbee avatar Jan 05 '25 11:01 Marcisbee

not yet .

create a class need to expose JS_NewClass https://github.com/buke/quickjs-go/blob/787d3dba3741fa67bd77af8965e614fa7b7772c3/deps/include/quickjs.h#L506

I will add it if I have time , maybe weeks later...

buke avatar Jan 05 '25 12:01 buke

done. please see https://github.com/buke/quickjs-go/pull/459

buke avatar Jun 14 '25 15:06 buke