how get js function code
dreamfly32 opened this issue · 1 comments
dreamfly32 commented
worstperson commented
If just executing the code is not an option, maybe you can extract what you need from the bytecode disassembly?
import js2py
import dis
context = js2py.EvalJs()
context.execute('''
function sum(a, b) {
return a + b
}
''')
print(dis.dis(context.sum._obj.code))