What is difference between v8::Object::Has() and v8::Object::HasOwnProperty()?

20 views
Skip to first unread message

kent williams

unread,
Dec 7, 2016, 5:48:47 PM12/7/16
to v8-users
If this is documented anywhere, I haven't found it.

What is difference between v8::Object::Has() and v8::Object::HasOwnProperty()?

for example:

var x = { HasThisProperty : true };

Both functions return true.

What would be a case where one was true and the other false?

Jakob Kummerow

unread,
Dec 7, 2016, 7:11:52 PM12/7/16
to v8-users

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Kanev

unread,
Dec 8, 2016, 3:25:00 AM12/8/16
to v8-users
Documentation is available in the header files, `Has` will return true whether the property is attached on the concrete object, or on the object prototype, while HasOwnProperty will return true only if the property is available on the object instance, but not on the prototype.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages