-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P5
-
Affects Version/s: 8
-
Component/s: core-libs
-
None
-
b105
-
generic
-
generic
var foo = {};
foo instanceof bar;
or
var foo = {};
foo instanceof 5;
Both of these yield the following error message: "instanceof cannot be used on objects without [[HasInstance]]", which is confusing.
Perhaps, instead, something along the lines of "instanceof may only be called with a type as the right-hand argument."
foo instanceof bar;
or
var foo = {};
foo instanceof 5;
Both of these yield the following error message: "instanceof cannot be used on objects without [[HasInstance]]", which is confusing.
Perhaps, instead, something along the lines of "instanceof may only be called with a type as the right-hand argument."