Closed yiwiz-sai closed 4 years ago
Isn't this just Object.keys(globalThis)
?
For example
context = quickjs.Context() code = "random_name='1234567'" try: context.eval(code) except: print(traceback.format_exc())
So how do I know there is a global variable "random_name" ?
context.eval("globalThis.random_name !== undefined")
Also, Object.keys(globalThis)
will be equal to ["random_name"]
cool, thank you very much, if test_quickjs,py has this code, it will help.
is it possible to provide one?