MDN’s new design is in Beta! A sneak peek: https://blog.mozilla.org/opendesign/mdns-new-design-beta/

JS::ObjectOrNullValue

This article covers features introduced in SpiderMonkey 24

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

Syntax

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

Description

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,