Function mozjs::jsapi::GetSymbolFor

source ·
pub unsafe extern "C" fn GetSymbolFor(
    cx: *mut JSContext,
    key: Handle<*mut JSString>
) -> *mut Symbol
Expand description

Symbol.for as specified in ES6.

Get a Symbol with the description ‘key’ from the Runtime-wide symbol registry. If there is not already a Symbol with that description in the registry, a new Symbol is created and registered. ‘key’ must not be null.