Tests whether the specified object o
has a property p
on itself or
in its prototype chain.
Tests whether the specified object o
has a property p
on itself or
in its prototype chain.
This method is the equivalent of p in o
in JavaScript.
Returns the names of all the enumerable properties of the specified
object o
, including properties in its prototype chain.
Returns the names of all the enumerable properties of the specified
object o
, including properties in its prototype chain.
This method returns the same set of names that would be enumerated by a for-in loop in JavaScript, in the same order.
This method assumes that all keys enumerated by a for-in loop are
strings. If this is not the case, calling this method is an undefined
behavior of kind ClassCastException
. Note that for all *ordinary*
objects, the ECMAScript 2015 guarantees that this is the case. It might
be false if o
is a proxy object or another exotic object.
For ordinary objects, if the underlying implementation guarantees an order for for-in loops, then this is guaranteed to be consistent with js.Object.keys, in the sense that the list returned by js.Object.keys is a sublist of the list returned by this method (not just a subset).