We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent beff8ba commit c59253eCopy full SHA for c59253e
compiler/natives/src/syscall/js/js.go
@@ -117,9 +117,9 @@ var (
117
118
func init() {
119
if js.Global != nil {
120
- id = js.Global.Call("eval", "(function(x) { return x; })")
121
- instanceOf = js.Global.Call("eval", "(function(x, y) { return x instanceof y; })")
122
- getValueType = js.Global.Call("eval", `(function(x) {
+ id = js.Global.Call("Function", "x", "return x")
+ instanceOf = js.Global.Call("Function", "x", "y", "return x instanceof y")
+ getValueType = js.Global.Call("Function", "x", `
123
if (typeof(x) === "undefined") {
124
return 0; // TypeUndefined
125
}
@@ -142,7 +142,7 @@ func init() {
142
return 7; // TypeFunction
143
144
return 6; // TypeObject
145
-})`)
+`)
146
147
148
0 commit comments