Ios native call js, what is the global scope of js?

1. If I call the function of js natively, I am not sure what the scope of the function of js is. I packaged the node module with bowseriry and wanted to expose the function I wrote to the native call
. For example, the global domain of window,node in the browser is global,. I don"t know the global domain of JavaScriptCore provided by ios

.

in fact, your code should be allowed in webview, which is also window. Or if you directly call the code


javascriptcore of JavaScriptcore, you can get the value of the global variable through jscontext ["@ key"]; jscontext can be understood as window


or window in the browser!

Menu