(vm *goja.Runtime)
| 241 | } |
| 242 | |
| 243 | func AddIsResolvableEx(vm *goja.Runtime) error { |
| 244 | return vm.GlobalObject().Set("isResolvableEx", func(call goja.FunctionCall) goja.Value { |
| 245 | if len(call.Arguments) != 1 { |
| 246 | panic(vm.NewTypeError("isResolvableEx expects exactly 1 argument")) |
| 247 | } |
| 248 | res := dnsResolveEx(call.Argument(0).String()) |
| 249 | return vm.ToValue(len(res) > 0) |
| 250 | }) |
| 251 | } |
| 252 | |
| 253 | func AddIsInNetEx(vm *goja.Runtime) error { |
| 254 | return vm.GlobalObject().Set("isInNetEx", func(call goja.FunctionCall) goja.Value { |
nothing calls this directly
no test coverage detected