foo = new Foo(); foo instanceof Foo; // true
public override bool HasInstance(Scriptable instance) { object protoProp = ScriptableObject.GetProperty(this, "prototype"); if (protoProp is Scriptable) { return ScriptRuntime.JsDelegatesTo(instance, (Scriptable)protoProp); } throw ScriptRuntime.TypeError1("msg.instanceof.bad.prototype", GetFunctionName()); }