MDN’s new design is in Beta! A sneak peek:


This article covers features introduced in SpiderMonkey 24

Convert a JSObject or null pointer to a JS::Value.


JS::ObjectOrNullValue(JSObject* obj)
Name Type Description
str JSObject* A pointer to a JSObject or null to convert.


JS::ObjectValue converts a given JSObject to JS::Value. If the pointer is null, it returns JavaScript null. The conversion always succeeds.

See Also

Document Tags and Contributors

 Contributors to this page: rolfedh, arai
 Last updated by: rolfedh,