This is an archived page. It's not actively maintained.


This article covers features introduced in SpiderMonkey 38

Convert a JSProtoKey to JS ID.


JS::ProtoKeyToId(JSContext *cx, JSProtoKey key, JS::MutableHandleId idp);
Name Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext.
key JSProtoKey The prototype key to convert.
vp JS::MutableHandleId Out parameter. *idp receives the converted id.


JS::ProtoKeyToId converts a specified JS prototype key key, to a JS ID. JS::ProtoKeyToId stores a jsid to *idp.

See Also