(call FunctionCall)
| 53 | } |
| 54 | |
| 55 | func (r *Runtime) functionproto_toString(call FunctionCall) Value { |
| 56 | obj := r.toObject(call.This) |
| 57 | switch f := obj.self.(type) { |
| 58 | case funcObjectImpl: |
| 59 | return f.source() |
| 60 | case *proxyObject: |
| 61 | if _, ok := f.target.self.(funcObjectImpl); ok { |
| 62 | return asciiString("function () { [native code] }") |
| 63 | } |
| 64 | } |
| 65 | panic(r.NewTypeError("Function.prototype.toString requires that 'this' be a Function")) |
| 66 | } |
| 67 | |
| 68 | func (r *Runtime) functionproto_hasInstance(call FunctionCall) Value { |
| 69 | if o, ok := call.This.(*Object); ok { |
nothing calls this directly
no test coverage detected