public static InstanceOf ( object a, object b, |
||
a | object | |
b | object | |
cx | ||
return | bool |
public static bool InstanceOf(object a, object b, Context cx)
{
// Check RHS is an object
if (!(b is Scriptable))
{
throw TypeError0("msg.instanceof.not.object");
}
// for primitive values on LHS, return false
if (!(a is Scriptable))
{
return false;
}
return ((Scriptable)b).HasInstance((Scriptable)a);
}