BOOLEAN_TO_JSVAL
DOUBLE_TO_JSVAL
INT_FITS_IN_JSVAL
INT_TO_JSVAL
JS::Add*Root
JS::AutoIdArray
JS::AutoSaveExceptionState
JS::AutoValueArray
JS::AutoVectorRooter
JS::BooleanValue
JS::Call
JS::CallArgs
JS::CloneFunctionObject
JS::Compile
JS::CompileFunction
JS::CompileOffThread
JS::CompileOptions
JS::Construct
JS::CreateError
JS::CurrentGlobalOrNull
JS::DeflateStringToUTF8Buffer
JS::DoubleNaNValue
JS::DoubleValue
JS::Evaluate
JS::FalseValue
JS::Float32Value
JS::GetDeflatedUTF8StringLength
JS::GetFirstArgumentAsTypeHint
JS::GetSelfHostedFunction
JS::Handle
JS::HandleValueArray
JS::IdentifyStandardInstance
JS::Int32Value
JS::IsCallable
JS::MutableHandle
JS::NewFunctionFromSpec
JS::NullHandleValue
JS::NullValue
JS::NumberValue
JS::ObjectOrNullValue
JS::ObjectValue
JS::OrdinaryToPrimitive
JS::PersistentRooted
JS::PropertySpecNameEqualsId
JS::PropertySpecNameIsSymbol
JS::PropertySpecNameToPermanentId
JS::ProtoKeyToId
JS::Remove*Root
JS::Rooted
JS::SetLargeAllocationFailureCallback
JS::SetOutOfMemoryCallback
JS::SourceBufferHolder
JS::StringValue
JS::SymbolValue
JS::ToBoolean
JS::ToInt32
JS::ToInt64
JS::ToNumber
JS::ToPrimitive
JS::ToString
JS::ToUint16
JS::ToUint32
JS::ToUint64
JS::TrueHandleValue
JS::TrueValue
JS::UndefinedHandleValue
JS::UndefinedValue
JS::Value
JSAutoByteString
JSAutoCompartment
JSBool
JSCheckAccessOp
JSClass
JSClass.call
JSClass.flags
JSConstDoubleSpec
JSConvertOp
JSDeletePropertyOp
JSEnumerateOp
JSErrorFormatString
JSErrorReport
JSExceptionState
JSExnType
JSExtendedClass
JSExtendedClass.outerObject
JSExtendedClass.wrappedObject
JSFUN_BOUND_METHOD
JSFUN_GLOBAL_PARENT
JSFastNative
JSFinalizeOp
JSFreeOp
JSFunction
JSFunctionSpec
JSGetObjectOps
JSHasInstanceOp
JSID_EMPTY
JSID_IS_EMPTY
JSID_IS_GCTHING
JSID_IS_INT
JSID_IS_STRING
JSID_IS_SYMBOL
JSID_IS_VOID
JSID_IS_ZERO
JSID_VOID
JSIdArray
JSIteratorOp
JSMarkOp
JSNative
JSNewEnumerateOp
JSNewResolveOp
JSObject
JSObjectOp
JSObjectOps.defaultValue
JSObjectOps.defineProperty
JSObjectOps.destroyObjectMap
JSObjectOps.dropProperty
JSObjectOps.enumerate
JSObjectOps.getAttributes
JSObjectOps.getProperty
JSObjectOps.getRequiredSlot
JSObjectOps.lookupProperty
JSObjectOps.newObjectMap
JSObjectOps.setProto
JSObjectPrincipalsFinder
JSPRINCIPALS_HOLD
JSPrincipals
JSPrincipalsTranscoder
JSProperty
JSPropertyDescriptor
JSPropertyOp
JSPropertySpec
JSProtoKey
JSReserveSlotsOp
JSResolveOp
JSRuntime
JSSecurityCallbacks.contentSecurityPolicyAllows
JSString
JSStringFinalizer
JSTraceOp
JSType
JSVAL_IS_BOOLEAN
JSVAL_IS_DOUBLE
JSVAL_IS_GCTHING
JSVAL_IS_INT
JSVAL_IS_NULL
JSVAL_IS_NUMBER
JSVAL_IS_OBJECT
JSVAL_IS_PRIMITIVE
JSVAL_IS_STRING
JSVAL_IS_VOID
JSVAL_LOCK
JSVAL_NULL
JSVAL_ONE
JSVAL_TO_BOOLEAN
JSVAL_TO_DOUBLE
JSVAL_TO_GCTHING
JSVAL_TO_INT
JSVAL_TO_OBJECT
JSVAL_TO_STRING
JSVAL_TRUE
JSVAL_UNLOCK
JSVAL_VOID
JSVAL_ZERO
JSVersion
JSXDRObjectOp
JS_ASSERT_STRING_IS_FLAT
JS_Add*Root
JS_AddArgumentFormatter
JS_AddExternalStringFinalizer
JS_AddFinalizeCallback
JS_AliasElement
JS_AliasProperty
JS_AlreadyHasOwnProperty
JS_BeginRequest
JS_BindCallable
JS_BufferIsCompilableUnit
JS_CStringsAreUTF8
JS_CallFunction
JS_CheckAccess
JS_CheckForInterrupt
JS_ClearContextThread
JS_ClearDateCaches
JS_ClearNewbornRoots
JS_ClearNonGlobalObject
JS_ClearPendingException
JS_ClearRegExpStatics
JS_ClearScope
JS_CloneFunctionObject
JS_CompareStrings
JS_CompileFileHandleForPrincipals
JS_CompileFileHandleForPrincipalsVersion
JS_CompileFunction
JS_CompileFunctionForPrincipals
JS_CompileScript
JS_CompileScriptForPrincipals
JS_CompileUCFunctionForPrincipalsVersion
JS_CompileUTF8File
JS_CompileUTF8FileHandle
JS_ConcatStrings
JS_ConstructObject
JS_ContextIterator
JS_ConvertArguments
JS_ConvertArgumentsVA
JS_ConvertValue
JS_DecompileFunction
JS_DecompileFunctionBody
JS_DecompileScript
JS_DecompileScriptObject
JS_DeepFreezeObject
JS_DefaultValue
JS_DefineConstDoubles
JS_DefineElement
JS_DefineFunction
JS_DefineFunctions
JS_DefineObject
JS_DefineOwnProperty
JS_DefineProperties
JS_DefineProperty
JS_DefinePropertyWithTinyId
JS_DeleteElement
JS_DeleteElement2
JS_DeleteProperty
JS_DeleteProperty2
JS_DestroyContext
JS_DestroyIdArray
JS_DestroyRuntime
JS_DestroyScript
JS_DoubleIsInt32
JS_DoubleToInt32
JS_DropExceptionState
JS_DumpHeap
JS_DumpNamedRoots
JS_EncodeCharacters
JS_EncodeString
JS_EncodeStringToBuffer
JS_EnterCompartment
JS_EnterCrossCompartmentCall
JS_EnterLocalRootScope
JS_Enumerate
JS_EnumerateDiagnosticMemoryRegions
JS_EnumerateResolvedStandardClasses
JS_EnumerateStandardClasses
JS_ErrorFromException
JS_EvaluateScript
JS_EvaluateScriptForPrincipals
JS_ExecuteRegExp
JS_ExecuteScript
JS_ExecuteScriptPart
JS_ExecuteScriptVersion
JS_FORGET_STRING_FLATNESS
JS_FS
JS_FileEscapedString
JS_Finish
JS_FlattenString
JS_FlushCaches
JS_ForgetLocalRoot
JS_ForwardGetPropertyTo
JS_FreezeObject
JS_GC
JS_GET_CLASS
JS_GetArrayLength
JS_GetArrayPrototype
JS_GetClass
JS_GetClassObject
JS_GetClassPrototype
JS_GetCompartmentPrivate
JS_GetConstructor
JS_GetContextPrivate
JS_GetContextThread
JS_GetDefaultFreeOp
JS_GetElement
JS_GetEmptyString
JS_GetEmptyStringValue
JS_GetErrorPrototype
JS_GetExternalStringClosure
JS_GetExternalStringFinalizer
JS_GetFlatStringChars
JS_GetFunctionArity
JS_GetFunctionCallback
JS_GetFunctionFlags
JS_GetFunctionId
JS_GetFunctionName
JS_GetFunctionObject
JS_GetFunctionPrototype
JS_GetFunctionScript
JS_GetGCParameter
JS_GetGlobalForCompartmentOrNull
JS_GetGlobalForObject
JS_GetGlobalForObject3
JS_GetGlobalForScopeChain
JS_GetGlobalObject
JS_GetImplementationVersion
JS_GetInstancePrivate
JS_GetInternedStringChars
JS_GetLatin1FlatStringChars
JS_GetLatin1InternedStringChars
JS_GetLatin1StringCharsAndLength
JS_GetLocaleCallbacks
JS_GetNaNValue
JS_GetObjectPrototype
JS_GetObjectRuntime
JS_GetOptions
JS_GetOwnPropertyDescriptor
JS_GetParent
JS_GetParentRuntime
JS_GetPendingException
JS_GetPositiveInfinityValue
JS_GetPrivate
JS_GetProperty
JS_GetPropertyAttributes
JS_GetPropertyAttrsGetterAndSetter
JS_GetPropertyDefault
JS_GetPropertyDescriptor
JS_GetPrototype
JS_GetRegExpFlags
JS_GetRegExpSource
JS_GetReservedSlot
JS_GetRuntime
JS_GetRuntimePrivate
JS_GetScopeChain
JS_GetSecurityCallbacks
JS_GetStringBytes
JS_GetStringCharAt
JS_GetStringChars
JS_GetStringCharsAndLength
JS_GetStringEncodingLength
JS_GetStringLength
JS_GetTwoByteExternalStringChars
JS_GetTypeName
JS_GetVersion
JS_HasArrayLength
JS_HasElement
JS_HasInstance
JS_HasOwnProperty
JS_HasProperty
JS_IdArrayGet
JS_IdArrayLength
JS_IdToProtoKey
JS_IdToValue
JS_Init
JS_InitCTypesClass
JS_InitClass
JS_InitStandardClasses
JS_InstanceOf
JS_InternJSString
JS_InternString
JS_IsArrayObject
JS_IsAssigning
JS_IsBuiltinEvalFunction
JS_IsBuiltinFunctionConstructor
JS_IsConstructing
JS_IsConstructing_PossiblyWithGivenThisObject
JS_IsConstructor
JS_IsExceptionPending
JS_IsExtensible
JS_IsExternalString
JS_IsGlobalObject
JS_IsIdentifier
JS_IsNative
JS_IsNativeFunction
JS_IsRunning
JS_IsStopIteration
JS_IterateCompartments
JS_LeaveCompartment
JS_LeaveCrossCompartmentCall
JS_LeaveLocalRootScope
JS_LeaveLocalRootScopeWithResult
JS_LinkConstructorAndPrototype
JS_Lock
JS_LockGCThing
JS_LookupElement
JS_LookupProperty
JS_LooselyEqual
JS_MakeStringImmutable
JS_MapGCRoots
JS_MaybeGC
JS_New
JS_NewArrayObject
JS_NewCompartmentAndGlobalObject
JS_NewContext
JS_NewDateObject
JS_NewDateObjectMsec
JS_NewDependentString
JS_NewDouble
JS_NewDoubleValue
JS_NewExternalString
JS_NewFunction
JS_NewGlobalObject
JS_NewNumberValue
JS_NewObject
JS_NewObjectForConstructor
JS_NewPlainObject
JS_NewPropertyIterator
JS_NewRegExpObject
JS_NewRuntime
JS_NewScriptObject
JS_NewStringCopyN
JS_NewStringCopyZ
JS_NewUCString
JS_NextProperty
JS_Now
JS_NumberValue
JS_ObjectIsDate
JS_ObjectIsFunction
JS_ObjectIsRegExp
JS_PSGS
JS_ParseJSON
JS_PopArguments
JS_PreventExtensions
JS_PropertyStub
JS_PushArguments
JS_PutEscapedString
JS_Remove*Root
JS_RemoveExternalStringFinalizer
JS_RemoveRootRT
JS_ReportError
JS_ReportErrorNumber
JS_ReportOutOfMemory
JS_ReportPendingException
JS_ResolveStandardClass
JS_RestoreExceptionState
JS_SET_TRACING_DETAILS
JS_SameValue
JS_SaveExceptionState
JS_SaveFrameChain
JS_ScheduleGC
JS_SealObject
JS_SetAllNonReservedSlotsToUndefined
JS_SetArrayLength
JS_SetBranchCallback
JS_SetCallReturnValue2
JS_SetCheckObjectAccessCallback
JS_SetCompartmentNameCallback
JS_SetContextCallback
JS_SetDefaultLocale
JS_SetDestroyCompartmentCallback
JS_SetElement
JS_SetErrorReporter
JS_SetExtraGCRoots
JS_SetFunctionCallback
JS_SetGCCallback
JS_SetGCParametersBasedOnAvailableMemory
JS_SetGCZeal
JS_SetGlobalObject
JS_SetICUMemoryFunctions
JS_SetInterruptCallback
JS_SetNativeStackQuota
JS_SetObjectPrincipalsFinder
JS_SetOperationCallback
JS_SetOptions
JS_SetParent
JS_SetPendingException
JS_SetPrincipalsTranscoder
JS_SetPrivate
JS_SetProperty
JS_SetPropertyAttributes
JS_SetPrototype
JS_SetRegExpInput
JS_SetScriptStackQuota
JS_SetThreadStackLimit
JS_SetVersion
JS_SetVersionForCompartment
JS_ShutDown
JS_StrictlyEqual
JS_StringEqualsAscii
JS_StringHasBeenInterned
JS_StringHasLatin1Chars
JS_StringIsFlat
JS_StringToVersion
JS_SuspendRequest
JS_THREADSAFE
JS_ThrowStopIteration
JS_ToggleOptions
JS_TracerInit
JS_TypeOfValue
JS_Unlock
JS_ValueToBoolean
JS_ValueToECMAInt32
JS_ValueToFunction
JS_ValueToId
JS_ValueToInt32
JS_ValueToNumber
JS_ValueToObject
JS_ValueToSource
JS_ValueToString
JS_VersionToString
JS_YieldRequest
JS_freeop
JS_malloc
JS_updateMallocCounter
OBJECT_TO_JSVAL
PRIVATE_TO_JSVAL
Property attributes
STRING_TO_JSVAL
Stored value
jschar
jsdouble
jsid
jsint
The JSAPI is the C++ API for the SpiderMonkey JavaScript engine. To learn how to use the JSAPI, see the JSAPI User Guide and the JSAPI Cookbook.
JS_Init
Added in SpiderMonkey 31JS_ShutDown
JSRuntime
JS_NewRuntime
Obsolete since JSAPI 52JS_DestroyRuntime
JS_GetRuntimePrivate
JS_SetRuntimePrivate
JS_SetNativeStackQuota
Added in SpiderMonkey 17JS_ContextIterator
Obsolete since JSAPI 52JS_Finish
Obsolete since JSAPI 19JSContext
JS_NewContext
JS_DestroyContext
JS_DestroyContextNoGC
JS_SetContextCallback
JSContextOp
JS_GetRuntime
JS_GetParentRuntime
Added in SpiderMonkey 31JS_GetObjectRuntime
Added in SpiderMonkey 17JS_GetContextPrivate
JS_SetContextPrivate
JS_GetSecondContextPrivate
Added in SpiderMonkey 17JS_SetSecondContextPrivate
Added in SpiderMonkey 17JS_SetInterruptCallback
Added in SpiderMonkey 31JS_GetInterruptCallback
Added in SpiderMonkey 31JS_RequestInterruptCallback
Added in SpiderMonkey 31JS_CheckForInterrupt
Added in JSAPI 45JS_DestroyContextMaybeGC
Obsolete since JSAPI 14JS_SetBranchCallback
Obsolete since JavaScript 1.9.1JS_SetOperationCallback
Obsolete since JSAPI 30JS_GetOperationCallback
Obsolete since JSAPI 30JS_TriggerOperationCallback
Obsolete since JSAPI 30JS_ClearOperationCallback
Obsolete since JavaScript 1.9.1JS_GetOperationLimit
Obsolete since JavaScript 1.9.1JS_SetOperationLimit
Obsolete since JavaScript 1.9.1JS_MAX_OPERATION_LIMIT
Obsolete since JavaScript 1.9.1JS_OPERATION_WEIGHT_BASE
Obsolete since JavaScript 1.9.1JS_SetThreadStackLimit
Obsolete since JSAPI 13JS_SetScriptStackQuota
Obsolete since JavaScript 1.8.6JS_SetOptions
Obsolete since JSAPI 27JS_GetOptions
Obsolete since JSAPI 27JS_ToggleOptions
Obsolete since JSAPI 27JSVersion
JS_GetImplementationVersion
JS_GetVersion
JS_SetVersionForCompartment
Added in SpiderMonkey 31JS_StringToVersion
JS_VersionToString
JS_SetVersion
Obsolete since JSAPI 25JS::CurrentGlobalOrNull
Added in SpiderMonkey 31JS_GetGlobalForScopeChain
Obsolete since JSAPI 25JS_GetGlobalObject
Obsolete since JSAPI 24JS_SetGlobalObject
Obsolete since JSAPI 25JS_EnumerateResolvedStandardClasses
Obsolete since JSAPI 24JS_IsAssigning
Obsolete since JavaScript 1.8.5JS_IsConstructing
Obsolete since JSAPI 26JS_IsConstructing_PossiblyWithGivenThisObject
Obsolete since JSAPI 17JS_GetScopeChain
Obsolete since JavaScript 1.8.7Compartments:
JSAutoCompartment
Added in SpiderMonkey 24JS_NewGlobalObject
Added in SpiderMonkey 17JS_EnterCompartment
Added in SpiderMonkey 24JS_LeaveCompartment
Added in SpiderMonkey 24JS_GetCompartmentPrivate
Added in SpiderMonkey 1.8.5JS_SetCompartmentPrivate
Added in SpiderMonkey 1.8.5JS_GetGlobalForCompartmentOrNull
Added in SpiderMonkey 17JS_IterateCompartments
Added in SpiderMonkey 17JS_SetDestroyCompartmentCallback
Added in SpiderMonkey 17JS_SetCompartmentNameCallback
Added in SpiderMonkey 17JS_NewCompartmentAndGlobalObject
Added in SpiderMonkey 1.8.1 Obsolete since JSAPI 16JS_EnterCrossCompartmentCall
Added in SpiderMonkey 1.8.1 Obsolete since JSAPI 18JS_LeaveCrossCompartmentCall
Added in SpiderMonkey 1.8.1 Obsolete since JSAPI 18Locale callbacks:
Locale callback types:
Just running some JavaScript code is straightforward:
JS::CompileOptions
Added in SpiderMonkey 17JS::OwningCompileOptions
Added in SpiderMonkey 31JS::ReadonlyCompileOptions
Added in SpiderMonkey 31JS::SourceBufferHolder
Added in SpiderMonkey 31JS::Evaluate
Added in SpiderMonkey 17JS_EvaluateScript
Obsolete since JSAPI 36JS_EvaluateUCScript
Obsolete since JSAPI 36JS_EvaluateScriptForPrincipals
Obsolete since JSAPI 30JS_EvaluateUCScriptForPrincipals
Obsolete since JSAPI 30JS_EvaluateScriptForPrincipalsVersion
Obsolete since JSAPI 30JS_EvaluateUCScriptForPrincipalsVersion
Obsolete since JSAPI 30You can instead compile JavaScript code into a JSScript
which you can then execute multiple times.
JSScript
JS::Compile
Added in SpiderMonkey 17JS::CompileOffThread
Added in SpiderMonkey 31JS::CanCompileOffThread
Added in SpiderMonkey 31JS::FinishOffThreadScript
Added in SpiderMonkey 31JS_CompileScript
JS_CompileUCScript
JS_BufferIsCompilableUnit
JS_ExecuteScript
JS::CloneAndExecuteScript
Added in SpiderMonkey 31JS_DecompileScript
JS_ExecuteScriptVersion
Obsolete since JSAPI 36JS_CompileUTF8File
Added in SpiderMonkey 11 Obsolete since JSAPI 19JS_CompileUTF8FileHandle
Added in SpiderMonkey 11 Obsolete since JSAPI 19JS_CompileUTF8FileHandleForPrincipals
Added in SpiderMonkey 11 Obsolete since JSAPI 19JS_CompileFile
Obsolete since JSAPI 11JS_CompileFileHandle
Obsolete since JSAPI 11JS_CompileFileHandleForPrincipals
Obsolete since JSAPI 11JS_CompileScriptForPrincipals
Obsolete since JSAPI 28JS_CompileUCScriptForPrincipals
Obsolete since JSAPI 28JS_CompileScriptForPrincipalsVersion
Obsolete since JSAPI 19JS_CompileUCScriptForPrincipalsVersion
Obsolete since JSAPI 19JS_GetScriptObject
Obsolete since JSAPI 8JS_NewScriptObject
Obsolete since JSAPI 8JS_ExecuteScriptPart
Obsolete since JavaScript 1.9.3JS_DestroyScript
Obsolete since JSAPI 8You can also compile JavaScript code into a function:
JSFunction
JS::CompileFunction
Added in SpiderMonkey 17JS_DecompileFunction
JS_DecompileFunctionBody
JS_CompileFunction
Obsolete since JSAPI 36JS_CompileFunctionForPrincipals
Obsolete since JSAPI 28JS_CompileUCFunction
Obsolete since JSAPI 36JS_CompileUCFunctionForPrincipals
Obsolete since JSAPI 28JSErrorFormatString
Added in SpiderMonkey 17JSErrorReport
JS::AutoSaveExceptionState
Added in SpiderMonkey 31JSExnType
Added in SpiderMonkey 17JS_ReportError
JS_ReportWarning
JS_ReportErrorNumber
JS_ReportErrorNumberUC
JS_ReportErrorFlagsAndNumber
JS_ReportErrorFlagsAndNumberUC
JS_ReportErrorNumberUCArray
Added in SpiderMonkey 24JS_ReportOutOfMemory
JS_ReportAllocationOverflow
Added in SpiderMonkey 1.8JS_GetErrorReporter
JS_SetErrorReporter
Obsolete since JSAPI 52JS_ErrorFromException
JS_GetErrorPrototype
JSREPORT_IS_EXCEPTION
JSREPORT_IS_STRICT
JSREPORT_IS_WARNING
JSREPORT_IS_STRICT_MODE_ERROR
The following functions allow C/C++ functions to throw and catch JavaScript exceptions:
JS::CreateError
Added in SpiderMonkey 38JS_IsExceptionPending
JS_GetPendingException
JS_SetPendingException
JS_ClearPendingException
JS_ThrowStopIteration
Added in SpiderMonkey 1.8JS_IsStopIteration
Added in SpiderMonkey 31These functions translate errors into exceptions and vice versa:
JS_ThrowReportedError
Obsolete since JSAPI 29JS::Value
constructors:
JS::NullValue
Added in SpiderMonkey 24JS::UndefinedValue
Added in SpiderMonkey 24JS::BooleanValue
Added in SpiderMonkey 24JS::TrueValue
Added in SpiderMonkey 24JS::FalseValue
Added in SpiderMonkey 24JS::NumberValue
Added in SpiderMonkey 24JS::Int32Value
Added in SpiderMonkey 24JS::DoubleValue
Added in SpiderMonkey 24JS::Float32Value
Added in SpiderMonkey 24JS::StringValue
Added in SpiderMonkey 24JS::ObjectValue
Added in SpiderMonkey 24JS::ObjectOrNullValue
Added in SpiderMonkey 24JS::SymbolValue
Added in SpiderMonkey 38JS::Value
constants:
JS::NullHandleValue
Added in SpiderMonkey 24JS::UndefinedHandleValue
Added in SpiderMonkey 24JS::TrueHandleValue
Added in SpiderMonkey 38JS::FalseHandleValue
Added in SpiderMonkey 38jsval
constants:
JSVAL_NULL
Obsolete since JSAPI 42JSVAL_VOID
Obsolete since JSAPI 42JSVAL_TRUE
Obsolete since JSAPI 42JSVAL_FALSE
Obsolete since JSAPI 42JSVAL_ZERO
Obsolete since JSAPI 42JSVAL_ONE
Obsolete since JSAPI 42Function and macros for checking the type of a jsval
:
JSType
JS_TypeOfValue
All of the following are deprecated. See JS::Value
for their modern replacements.
JSVAL_IS_NULL
Obsolete since JSAPI 32JSVAL_IS_VOID
Obsolete since JSAPI 32JSVAL_IS_BOOLEAN
Obsolete since JSAPI 32JSVAL_IS_NUMBER
Obsolete since JSAPI 32JSVAL_IS_INT
Obsolete since JSAPI 32JSVAL_IS_DOUBLE
Obsolete since JSAPI 32JSVAL_IS_STRING
Obsolete since JSAPI 32JSVAL_IS_OBJECT
Obsolete since JSAPI 15JSVAL_IS_PRIMITIVE
Obsolete since JSAPI 32JSVAL_IS_GCTHING
Obsolete since JSAPI 32High-level type-conversion routines for packing and unpacking function arguments.
JS_ConvertArguments
Obsolete since JSAPI 38JS_ConvertArgumentsVA
Obsolete since JSAPI 38JS_PushArguments
Obsolete since JavaScript 1.8.5JS_PushArgumentsVA
Obsolete since JavaScript 1.8.5JS_PopArguments
Obsolete since JavaScript 1.8.5JS_AddArgumentFormatter
Obsolete since JSAPI 18JS_RemoveArgumentFormatter
Obsolete since JSAPI 18The following functions convert JS values to various types. They can be safely applied to jsval
s of any type. They may return new objects. For example, JS_ValueToObject(cx, s)
where s
is a string creates a new String
wrapper object. These functions may call JavaScript methods. For example, JS_ValueToString(cx, obj)
may call obj.toString()
.
JS::ToBoolean
Added in SpiderMonkey 17JS::ToUint16
Added in SpiderMonkey 17JS::ToInt32
Added in SpiderMonkey 17JS::ToUint32
Added in SpiderMonkey 17JS::ToInt64
Added in SpiderMonkey 17JS::ToUint64
Added in SpiderMonkey 17JS::ToNumber
Added in SpiderMonkey 17JS::ToString
Added in SpiderMonkey 31JS::OrdinaryToPrimitive
Added in SpiderMonkey 38JS_ValueToConstructor
JS_ValueToFunction
JS_ValueToObject
JS_ValueToSource
JS_ConvertValue
JS_ValueToBoolean
Obsolete since JSAPI 28JS_ValueToECMAInt32
Obsolete since JSAPI 26JS_ValueToECMAUint32
Obsolete since JSAPI 28JS_ValueToInt32
Obsolete since JSAPI 28JS_ValueToNumber
Obsolete since JSAPI 27JS_ValueToString
Obsolete since JSAPI 28JS_ValueToUint16
Obsolete since JSAPI 28Fast, unchecked type-casting macros. These macros must not be applied to values that are not known to be the right type. Like C casts, they may cause crashes if applied to incorrect values. They never create new objects or call into JavaScript code.
BOOLEAN_TO_JSVAL
Obsolete since JSAPI 42INT_TO_JSVAL
Obsolete since JSAPI 42DOUBLE_TO_JSVAL
Obsolete since JSAPI 42OBJECT_TO_JSVAL
Obsolete since JSAPI 42STRING_TO_JSVAL
Obsolete since JSAPI 42PRIVATE_TO_JSVAL
Obsolete since JSAPI 42INT_FITS_IN_JSVAL
Obsolete since JavaScript 1.8.5JSVAL_TO_BOOLEAN
Obsolete since JSAPI 32JSVAL_TO_INT
Obsolete since JSAPI 32JSVAL_TO_DOUBLE
Obsolete since JSAPI 32JSVAL_TO_OBJECT
Obsolete since JSAPI 32JSVAL_TO_STRING
Obsolete since JSAPI 32JSVAL_TO_GCTHING
Obsolete since JSAPI 32JSVAL_TO_PRIVATE
Obsolete since JSAPI 32A function that behaves like typeof
:
JS_GetTypeName
Obsolete since JSAPI 34And functions that behave like the equality operators:
These functions act like the Standard C malloc
family of functions, except that errors are reported using the SpiderMonkey error APIs rather than errno
. These functions also allow SpiderMonkey to account the number of bytes allocated:
JS_malloc
JS_free
JS_realloc
JS_strdup
JSFreeOp
Added in SpiderMonkey 17JS_freeop
Added in SpiderMonkey 17JS_GetDefaultFreeOp
Added in SpiderMonkey 17JavaScript objects, strings, and floating-point numbers are garbage collected. These functions provide access to the garbage collector:
JS_GC
JS_MaybeGC
JS_GetGCParameter
JS_SetGCParameter
JS_GetGCParameterForThread
Added in SpiderMonkey 17JS_SetGCParameterForThread
Added in SpiderMonkey 17JS_SetGCParametersBasedOnAvailableMemory
Added in SpiderMonkey 31
JSGCParamKey
JS_SetGCCallback
JSGCStatus
JS_AddFinalizeCallback
Added in SpiderMonkey 38
JSFinalizeStatus
Added in SpiderMonkey 17JS_RemoveFinalizeCallback
Added in SpiderMonkey 38JS_SetGCZeal
Added in SpiderMonkey 1.8JS_ScheduleGC
Added in SpiderMonkey 17JS_DumpHeap
Added in SpiderMonkey 1.8JS_SetGCCallbackRT
Obsolete since JSAPI 13JS_SetFinalizeCallback
Added in SpiderMonkey 17 Obsolete since JSAPI 32JS_MarkGCThing
Obsolete since JSAPI 5JS_IsAboutToBeFinalized
Obsolete since JSAPI 35JS_ClearNewbornRoots
Obsolete since JSAPI 5The rest of these APIs help protect objects from being destroyed by the garbage collector before the application is done using them.
If a variable is a root, then anything it points to will not be freed by the garbage collector. Failure to root objects is a very common cause of mysterious crashes.
JS::Rooted<T>
Added in SpiderMonkey 17
JS::RootedObject
Added in SpiderMonkey 17JS::RootedFunction
Added in SpiderMonkey 17JS::RootedScript
Added in SpiderMonkey 17JS::RootedString
Added in SpiderMonkey 17JS::RootedSymbol
Added in SpiderMonkey 38JS::RootedId
Added in SpiderMonkey 17JS::RootedValue
Added in SpiderMonkey 17JS::Handle<T>
Added in SpiderMonkey 17
JS::HandleFunction
Added in SpiderMonkey 17JS::HandleId
Added in SpiderMonkey 17JS::HandleObject
Added in SpiderMonkey 17JS::HandleScript
Added in SpiderMonkey 17JS::HandleString
Added in SpiderMonkey 17JS::HandleSymbol
Added in SpiderMonkey 38JS::HandleValue
Added in SpiderMonkey 17JS::MutableHandle<T>
Added in SpiderMonkey 17
JS::MutableHandleFunction
Added in SpiderMonkey 17JS::MutableHandleId
Added in SpiderMonkey 17JS::MutableHandleObject
Added in SpiderMonkey 17JS::MutableHandleScript
Added in SpiderMonkey 17JS::MutableHandleString
Added in SpiderMonkey 17JS::MutableHandleSymbol
Added in SpiderMonkey 38JS::MutableHandleValue
Added in SpiderMonkey 17JS::PersistentRooted<T>
Added in SpiderMonkey 31
JS::PersistentRootedObject
Added in SpiderMonkey 31JS::PersistentRootedFunction
Added in SpiderMonkey 31JS::PersistentRootedScript
Added in SpiderMonkey 31JS::PersistentRootedString
Added in SpiderMonkey 31JS::PersistentRootedSymbol
Added in SpiderMonkey 38JS::PersistentRootedId
Added in SpiderMonkey 31JS::PersistentRootedValue
Added in SpiderMonkey 31JS::AutoValueArray<N>
Added in SpiderMonkey 31JS::AutoVectorRooter<T>
Added in SpiderMonkey 17
JS::AutoValueVector
Added in SpiderMonkey 17JS::AutoIdVector
Added in SpiderMonkey 17JS::AutoObjectVector
Added in SpiderMonkey 24JS::AutoFunctionVector
Added in SpiderMonkey 31JS::AutoScriptVector
Added in SpiderMonkey 17JS::HandleValueArray
Added in SpiderMonkey 31JS::Add*Root
Added in SpiderMonkey 31 Obsolete since JSAPI 38
JS::AddValueRoot
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::AddStringRoot
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::AddObjectRoot
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::AddNamedValueRoot
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::AddNamedValueRootRT
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::AddNamedScriptRoot
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::AddNamedStringRoot
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::AddNamedObjectRoot
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::Remove*Root
Added in SpiderMonkey 31 Obsolete since JSAPI 38
JS::RemoveValueRoot
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::RemoveStringRoot
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::RemoveObjectRoot
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::RemoveScriptRoot
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::RemoveValueRootRT
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::RemoveStringRootRT
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::RemoveObjectRootRT
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS::RemoveScriptRootRT
Added in SpiderMonkey 31 Obsolete since JSAPI 38JS_Add*Root
Obsolete since JSAPI 31
JS_AddValueRoot
Obsolete since JSAPI 31JS_AddStringRoot
Obsolete since JSAPI 31JS_AddObjectRoot
Obsolete since JSAPI 31JS_AddGCThingRoot
Obsolete since JSAPI 31JS_AddNamedValueRoot
Obsolete since JSAPI 31JS_AddNamedStringRoot
Obsolete since JSAPI 31JS_AddNamedObjectRoot
Obsolete since JSAPI 31JS_AddNamedGCThingRoot
Obsolete since JSAPI 31JS_Remove*Root
Obsolete since JSAPI 31
JS_RemoveValueRoot
Obsolete since JSAPI 31JS_RemoveStringRoot
Obsolete since JSAPI 31JS_RemoveObjectRoot
Obsolete since JSAPI 31JS_RemoveGCThingRoot
Obsolete since JSAPI 31JS_AddRoot
Obsolete since JavaScript 1.8.5JS_AddNamedRoot
Obsolete since JavaScript 1.8.5JS_AddNamedRootRT
Obsolete since JavaScript 1.8.5JS_RemoveRoot
Obsolete since JavaScript 1.8.5JS_RemoveRootRT
Obsolete since JavaScript 1.8.5JS_MapGCRoots
Obsolete since JSAPI 19JSGCMapRootFun
Obsolete since JSAPI 19JS_DumpNamedRoots
Obsolete since JSAPI 19Local root scopes were another way of protecting objects from the garbage collector. They have been removed in JS 1.8.5, though
JS_EnterLocalRootScope
Obsolete since JavaScript 1.8.5JS_LeaveLocalRootScope
Obsolete since JavaScript 1.8.5JS_LeaveLocalRootScopeWithResult
Obsolete since JavaScript 1.8.5JS_ForgetLocalRoot
Obsolete since JavaScript 1.8.5Added in SpiderMonkey 1.8 If an object contains references to other GC things that are not stored in SpiderMonkey data structures ("slots"), it must implement the
hook to enable the garbage collector to traverse those references. Otherwise the garbage collector will not find all reachable objects and may collect objects that are still reachable, leading to a crash. (In SpiderMonkey 1.7 and earlier, the JSTraceOp
JSMarkOp
hook was used instead. This has since been removed.)
The tracing APIs are used by the garbage collector and
hooks. JSAPI applications may also use them to examine the object graph. (For example, these APIs support very smooth integration between the JS garbage collector and other garbage collectors.)JSTraceOp
JSTracer
Added in SpiderMonkey 1.8JS_TraceChildren
Added in SpiderMonkey 1.8JS_TraceRuntime
Added in SpiderMonkey 1.8JSVAL_IS_TRACEABLE
Added in SpiderMonkey 1.8 Obsolete since JSAPI 31JSVAL_TO_TRACEABLE
Added in SpiderMonkey 1.8 Obsolete since JSAPI 31JSVAL_TRACE_KIND
Added in SpiderMonkey 1.8 Obsolete since JSAPI 31JS_TRACER_INIT
Added in SpiderMonkey 1.8 Obsolete since JSAPI 12JS_TracerInit
Added in SpiderMonkey 12 Obsolete since JSAPI 31JS_CallTracer
Added in SpiderMonkey 1.8 Obsolete since JSAPI 22JS_SET_TRACING_DETAILS
Added in SpiderMonkey 1.8 Obsolete since JSAPI 26JS_SET_TRACING_INDEX
Added in SpiderMonkey 1.8 Obsolete since JSAPI 26JS_SET_TRACING_NAME
Added in SpiderMonkey 1.8 Obsolete since JSAPI 26JS_CALL_TRACER
Added in SpiderMonkey 1.8 Obsolete since JSAPI 23JS_CALL_VALUE_TRACER
Added in SpiderMonkey 1.8 Obsolete since JSAPI 23JS_CALL_OBJECT_TRACER
Added in SpiderMonkey 1.8 Obsolete since JSAPI 23JS_CALL_STRING_TRACER
Added in SpiderMonkey 1.8 Obsolete since JSAPI 23JS_CALL_DOUBLE_TRACER
Added in SpiderMonkey 1.8 Obsolete since JavaScript 1.8.5JS_PrintTraceThingInfo
(DEBUG-only) Added in SpiderMonkey 1.8 Obsolete since JSAPI 16Miscellaneous GC APIs:
JS_updateMallocCounter
Added in SpiderMonkey 17JS::SetLargeAllocationFailureCallback
Added in SpiderMonkey 31JS::SetOutOfMemoryCallback
Added in SpiderMonkey 31JS_EnumerateDiagnosticMemoryRegions
Added in SpiderMonkey 17JSVAL_LOCK
Obsolete since JSAPI 18JSVAL_UNLOCK
Obsolete since JSAPI 18JS_LockGCThing
Obsolete since JSAPI 21JS_LockGCThingRT
Obsolete since JSAPI 22JS_UnlockGCThing
Obsolete since JSAPI 21JS_UnlockGCThingRT
Obsolete since JSAPI 22JS_NumberValue
Added in SpiderMonkey 17JS_DefineConstDoubles
JSConstDoubleSpec
JS_DefineConstIntegers
Added in SpiderMonkey 38
JSConstIntegerSpec
Added in SpiderMonkey 38JS_GetNaNValue
JS_GetNegativeInfinityValue
JS_GetPositiveInfinityValue
JS_DoubleIsInt32
Added in SpiderMonkey 17JS_DoubleToInt32
Added in SpiderMonkey 17 Obsolete since JSAPI 38JS_DoubleToUint32
Added in SpiderMonkey 17 Obsolete since JSAPI 38JS_NewNumberValue
Obsolete since JSAPI 17JS_NewDoubleValue
Obsolete since JSAPI 17JS_NewDouble
Obsolete since JSAPI 17JSString
JSAutoByteString
Added in SpiderMonkey 17JS_NewStringCopyN
JS_NewStringCopyZ
JS_NewUCString
JS_NewUCStringCopyN
JS_NewUCStringCopyZ
JS_NewDependentString
JS_GetEmptyStringValue
JS_GetEmptyString
Added in SpiderMonkey 1.8.5JS_ConcatStrings
JS_CompareStrings
JS_StringEqualsAscii
Added in SpiderMonkey 1.8.5JS_FlatStringEqualsAscii
Added in SpiderMonkey 1.8.5JS_StringHasLatin1Chars
Added in SpiderMonkey 38JS_GetStringCharAt
Added in SpiderMonkey 38JS_GetFlatStringCharAt
Added in SpiderMonkey 38JS_GetStringLength
JS_EncodeString
Added in SpiderMonkey 1.8JS_EncodeStringToUTF8
Added in SpiderMonkey 24JS_EncodeStringToBuffer
Added in SpiderMonkey 1.8.5JS_GetStringEncodingLength
Added in SpiderMonkey 1.8.5JS_GetLatin1FlatStringChars
Added in SpiderMonkey 38JS_GetTwoByteFlatStringChars
Added in SpiderMonkey 38JS_GetLatin1StringCharsAndLength
Added in SpiderMonkey 38JS_GetTwoByteStringCharsAndLength
Added in SpiderMonkey 38JS::GetDeflatedUTF8StringLength
Added in SpiderMonkey 38JS::DeflateStringToUTF8Buffer
Added in SpiderMonkey 38JS_FileEscapedString
Added in SpiderMonkey 1.8.5JS_PutEscapedString
Added in SpiderMonkey 1.8.5JS_PutEscapedFlatString
Added in SpiderMonkey 1.8.5JS_FORGET_STRING_FLATNESS
Added in SpiderMonkey 1.8.5JS_StringIsFlat
Added in SpiderMonkey 38JS_ASSERT_STRING_IS_FLAT
Added in SpiderMonkey 1.8.5JS_FlattenString
Added in SpiderMonkey 1.8.5jschar
Obsolete since JSAPI 35JS_NewString
Obsolete since JSAPI 1.8.5JS_NewGrowableString
Obsolete since JSAPI 27JS_GetStringBytes
Obsolete since JSAPI 1.8.5JS_GetStringBytesZ
Obsolete since JSAPI 1.8.5JS_GetStringChars
Obsolete since JSAPI 1.8.5JS_GetStringCharsZ
Obsolete since JSAPI 33JS_GetStringCharsAndLength
Added in JSAPI 1.8.5 Obsolete since JSAPI 33JS_GetStringCharsZ
Added in SpiderMonkey 1.8.5 Obsolete since JSAPI 33JS_GetStringCharsZAndLength
Added in SpiderMonkey 1.8.5 Obsolete since JSAPI 33JS_GetFlatStringChars
Obsolete since JSAPI 33JS_MakeStringImmutable
Obsolete since JavaScript 1.8.5JS_EncodeCharacters
Obsolete since JSAPI 19JS_CStringsAreUTF8
Obsolete since JSAPI 19JS_SetCStringsAreUTF8
Obsolete since JSAPI 19Interning strings tells the SpiderMonkey engine to reuse existing string objects when possible.
JS_InternString
JS_InternStringN
JS_InternUCString
JS_InternUCStringN
JS_InternJSString
Added in SpiderMonkey 1.8.5JS_StringHasBeenInterned
Added in SpiderMonkey 17JS_GetLatin1InternedStringChars
Added in SpiderMonkey 38JS_GetTwoByteInternedStringChars
Added in SpiderMonkey 38JS_GetInternedStringChars
Obsolete since JSAPI 33JS_GetInternedStringCharsAndLength
Obsolete since JSAPI 33The character data for external strings is stored in memory provided by the application. Applications can use this to avoid copying data back and forth between SpiderMonkey's heap and application memory.
JSStringFinalizer
Added in SpiderMonkey 17JS_NewExternalString
JS_IsExternalString
Added in SpiderMonkey 17JS_GetTwoByteExternalStringChars
Added in SpiderMonkey 38JS_GetExternalStringFinalizer
Added in SpiderMonkey 17JS_AddExternalStringFinalizer
Obsolete since JSAPI 13JS_RemoveExternalStringFinalizer
Obsolete since JSAPI 13JS_GetExternalStringGCType
Obsolete since JSAPI 13JS_NewExternalStringWithClosure
Added in SpiderMonkey 6 Obsolete since JSAPI 13JS_GetExternalStringClosure
Added in SpiderMonkey 6 Obsolete since JSAPI 13JSObject
JS_DefineObject
JS_NewObject
JS_NewPlainObject
Added in SpiderMonkey 38JS_NewObjectForConstructor
Added in SpiderMonkey 1.8.5JS_NewGlobalObject
Added in SpiderMonkey 1.8JS_NewObjectWithGivenProto
JS_New
Added in SpiderMonkey 1.8JS_IsGlobalObject
Added in JSAPI 24JS_ConstructObject
Obsolete since JSAPI 16JS_ConstructObjectWithArguments
Obsolete since JSAPI 16JS_GetClass
JS_GetObjectPrototype
Added in JSAPI 17JS_GetFunctionPrototype
Added in SpiderMonkey 17JS_GetArrayPrototype
Added in SpiderMonkey 24JS_GetConstructor
JS_GetGlobalForObject
JS_GetInstancePrivate
JS_GetPrototype
JS_SetPrototype
JS_GetPrivate
JS_SetPrivate
JS_FreezeObject
Added in SpiderMonkey 1.8.5JS_DeepFreezeObject
Added in SpiderMonkey 1.8.5JS_IsExtensible
Added in SpiderMonkey 1.8.5JS_PreventExtensions
Added in SpiderMonkey 45JS_InstanceOf
JS_HasInstance
JS_IsNative
Added in SpiderMonkey 17JS::ToPrimitive
Added in SpiderMonkey 45JS::NewFunctionFromSpec
Added in SpiderMonkey 45JS_DefaultValue
Obsolete since JSAPI 44JS_GET_CLASS
Obsolete since JSAPI 13JS_SealObject
Obsolete since JavaScript 1.8.5JS_GetParent
Obsolete since JSAPI 39JS_SetParent
Obsolete since JSAPI 39JSProtoKey
Added in SpiderMonkey 24JS_GetClassObject
JS_GetClassPrototype
JS::ProtoKeyToId
Added in SpiderMonkey 38JS_IdToProtoKey
Added in SpiderMonkey 31JS::IdentifyStandardInstance
Added in SpiderMonkey 31JS::IdentifyStandardPrototype
Added in SpiderMonkey 31JS::IdentifyStandardInstanceOrPrototype
Added in SpiderMonkey 31JS::IdentifyStandardConstructor
Added in SpiderMonkey 38JS_NewDateObject
Added in SpiderMonkey 1.8.5JS_NewDateObjectMsec
Added in SpiderMonkey 1.8.5JS_ObjectIsDate
Added in SpiderMonkey 1.8.5JS_ClearDateCaches
Added in SpiderMonkey 17JS_Now
JS_SetDefaultLocale
Added in SpiderMonkey 24JS_ResetDefaultLocale
Added in SpiderMonkey 24These functions correspond directly to the ways scripts access object properties:
JS_GetProperty
JS_GetUCProperty
JS_GetPropertyById
Added in SpiderMonkey 1.8.1JS_SetProperty
JS_SetUCProperty
JS_SetPropertyById
Added in SpiderMonkey 1.8.1JS_HasProperty
JS_HasUCProperty
JS_HasPropertyById
Added in SpiderMonkey 1.8.1JS_HasOwnProperty
Added in JSAPI 45JS_HasOwnPropertyById
Added in JSAPI 45JS_DeleteProperty
JS_DeletePropertyById
Added in SpiderMonkey 1.8.1JS_DeleteProperty2
Obsolete since JSAPI 39JS_DeleteUCProperty2
Obsolete since JSAPI 39JS_DeletePropertyById2
Added in SpiderMonkey 1.8.1 Obsolete since JSAPI 39The following functions are lower-level, allowing the JSAPI application more access to details of how properties are implemented. "Define" is a lower-level version of "set" that provides access to extra settings and does not call setters. Similarly, "lookup" is a lower-level version of "get" that offers extra options and does not call getters.
JSPropertyDescriptor
Added in SpiderMonkey 1.8Property attributes
JSPROP_ENUMERATE
JSPROP_READONLY
JSPROP_PERMANENT
JSPROP_PROPOP_ACCESSORS
Added in SpiderMonkey 38JSPROP_GETTER
JSPROP_SETTER
JSPROP_SHARED
JSPROP_INDEX
JSPROP_DEFINE_LATE
Added in SpiderMonkey 38JSFUN_STUB_GSOPS
Added in SpiderMonkey 17JSFUN_CONSTRUCTOR
Added in SpiderMonkey 17JSPROP_REDEFINE_NONCONFIGURABLE
Added in SpiderMonkey 38JSPROP_RESOLVING
Added in SpiderMonkey 45JSPROP_IGNORE_ENUMERATE
Added in SpiderMonkey 38JSPROP_IGNORE_READONLY
Added in SpiderMonkey 38JSPROP_IGNORE_PERMANENT
Added in SpiderMonkey 38JSPROP_IGNORE_VALUE
Added in SpiderMonkey 38JS_AlreadyHasOwnElement
Added in SpiderMonkey 1.8JS_AlreadyHasOwnProperty
Added in SpiderMonkey 1.8JS_AlreadyHasOwnUCProperty
Added in SpiderMonkey 1.8JS_AlreadyHasOwnPropertyById
Added in SpiderMonkey 1.8.1JS_DefineProperty
JS_DefineUCProperty
JS_DefinePropertyById
Added in SpiderMonkey 1.8.1JS_DefineProperties
JS_Enumerate
JS_ForwardGetPropertyTo
Added in SpiderMonkey 17JS_ForwardGetElementTo
Added in SpiderMonkey 17JS_GetPropertyDescriptor
Added in SpiderMonkey 31JS_GetPropertyDescriptorById
Added in SpiderMonkey 1.8.1JS_GetOwnPropertyDescriptor
Added in SpiderMonkey 31JS_GetOwnPropertyDescriptorById
Added in SpiderMonkey 31JS_GetOwnUCPropertyDescriptor
Added in SpiderMonkey 45JS_SetAllNonReservedSlotsToUndefined
Added in SpiderMonkey 24JS_AliasProperty
Obsolete since JSAPI 8JS_ClearScope
Obsolete since JSAPI 18JS_ClearNonGlobalObject
Added in SpiderMonkey 18 Obsolete since JSAPI 34JS_DefineOwnProperty
Added in SpiderMonkey 1.8.5 Obsolete since JSAPI 33JS_DefinePropertyWithTinyId
Obsolete since JSAPI 30JS_DefineUCPropertyWithTinyId
Obsolete since JSAPI 30JS_GetPropertyDefault
Obsolete since JSAPI 26JS_GetPropertyByIdDefault
Obsolete since JSAPI 26JS_GetPropertyAttributes
Obsolete since JSAPI 26JS_GetUCPropertyAttributes
Obsolete since JSAPI 26JS_GetPropertyAttrsGetterAndSetter
Obsolete since JSAPI 26JS_GetUCPropertyAttrsGetterAndSetter
Obsolete since JSAPI 26JS_GetPropertyAttrsGetterAndSetterById
Obsolete since JSAPI 26JS_LookupProperty
Obsolete since JSAPI 37JS_LookupUCProperty
Obsolete since JSAPI 37JS_LookupPropertyById
Obsolete since JSAPI 37JS_LookupElement
Obsolete since JSAPI 37JS_LookupPropertyWithFlags
Obsolete since JSAPI 31JS_LookupPropertyWithFlagsById
Obsolete since JSAPI 31JS_NewPropertyIterator
Obsolete since JSAPI 36JS_NextProperty
Obsolete since JSAPI 36JS_SetPropertyAttributes
Obsolete since JSAPI 26JS_SetUCPropertyAttributes
Obsolete since JSAPI 26The following functions behave like JS_GetProperty
and JS_GetPropertyById
except when operating on E4X XML objects.
JS_GetMethod
Obsolete since JSAPI 23JS_GetMethodById
Obsolete since JSAPI 23A SpiderMonkey extension allows a native function to return an lvalue—that is, a reference to a property of an object:
JS_SetCallReturnValue2
Obsolete since JavaScript 1.8.5A jsid
is an identifier for a property or method of an object.
jsid
JS_IdToValue
JS_IdToProtoKey
Added in SpiderMonkey 31JS_ValueToId
JS_StringToId
Added in SpiderMonkey 38JS_IndexToId
Added in SpiderMonkey 17JS_CharsToId
Added in SpiderMonkey 24JS::ProtoKeyToId
Added in SpiderMonkey 38JS_IsIdentifier
Added in SpiderMonkey 17JSIdArray
JS::AutoIdArray
Added in SpiderMonkey 17JS_IdArrayLength
Added in SpiderMonkey 17JS_IdArrayGet
Added in SpiderMonkey 17JS_DestroyIdArray
JS_GetObjectId
Obsolete since JSAPI 31jsid
constants:
JSID_VOID
JSID_VOIDHANDLE
Added in SpiderMonkey 31JSID_EMPTY
JSID_EMPTYHANDLE
Added in SpiderMonkey 31Function for checking and converting the type of a jsid
:
JSID_IS_ZERO
JSID_IS_VOID
JSID_IS_EMPTY
JSID_IS_STRING
JSID_TO_STRING
INTERNED_STRING_TO_JSID
Added in SpiderMonkey 38JSID_TO_FLAT_STRING
Added in SpiderMonkey 17JSID_IS_INT
JSID_TO_INT
INT_FITS_IN_JSID
INT_TO_JSID
JSID_IS_SYMBOL
Added in SpiderMonkey 38JSID_TO_SYMBOL
Added in SpiderMonkey 38SYMBOL_TO_JSID
Added in SpiderMonkey 38JSID_IS_GCTHING
JSID_TO_GCTHING
JSID_IS_OBJECT
Obsolete since JSAPI 33JSID_IS_DEFAULT_XML_NAMESPACE
Obsolete since JSAPI 21These API features are used to define custom classes—object types that are implemented in C/C++ code but accessible from JavaScript.
JSClass
JSFunctionSpec
JSPropertySpec
JS_InitClass
JS_LinkConstructorAndPrototype
Added in SpiderMonkey 17JS::PropertySpecNameIsSymbol
Added in SpiderMonkey 38JS::PropertySpecNameEqualsId
Added in SpiderMonkey 38JS::PropertySpecNameToPermanentId
Added in SpiderMonkey 38JS_GetReservedSlot
JS_SetReservedSlot
JSExtendedClass
Obsolete since JavaScript 1.8.5JSObjectOps
Obsolete since JavaScript 1.8.5JSXMLObjectOps
Obsolete since JavaScript 1.8.5JSProperty
Obsolete since JSAPI 16Adding native properties and methods to classes:
JSNative
JSFunctionSpec
JS_FS
Added in SpiderMonkey 1.8JS_FN
Added in SpiderMonkey 1.8JS_SYM_FN
Added in SpiderMonkey 38JS_FNINFO
Added in SpiderMonkey 17JS_SELF_HOSTED_FN
Added in SpiderMonkey 31JS_SELF_HOSTED_SYM_FN
Added in SpiderMonkey 38JS_SYM_FNSPEC
Added in SpiderMonkey 38JS_FNSPEC
Added in SpiderMonkey 31JS_FS_END
Added in SpiderMonkey 1.8JSPropertySpec
JS_PSG
Added in SpiderMonkey 17JS_PSGS
Added in SpiderMonkey 17JS_SELF_HOSTED_GET
Added in SpiderMonkey 31JS_SELF_HOSTED_GETSET
Added in SpiderMonkey 31JS_PS_END
Added in SpiderMonkey 17JSFastNative
Added in SpiderMonkey 1.8 Obsolete since JavaScript 1.8.5The behavior of a JSClass
can be customized using these flags:
JSClass.flags
JSCLASS_HAS_PRIVATE
JSCLASS_PRIVATE_IS_NSISUPPORTS
JSCLASS_IS_DOMJSCLASS
Added in SpiderMonkey 17JSCLASS_IMPLEMENTS_BARRIERS
Added in SpiderMonkey 17JSCLASS_EMULATES_UNDEFINED
Added in SpiderMonkey 24JSCLASS_HAS_RESERVED_SLOTS(n)
JSCLASS_GLOBAL_FLAGS
JSCLASS_NEW_ENUMERATE
Obsolete since JSAPI 37JSCLASS_NEW_RESOLVE
Obsolete since JSAPI 36JSCLASS_SHARE_ALL_PROPERTIES
Obsolete since JavaScript 1.8.5JSCLASS_NEW_RESOLVE_GETS_START
Obsolete since JSAPI 16JSCLASS_CONSTRUCT_PROTOTYPE
Obsolete since JSAPI 11JSCLASS_IS_EXTENDED
Obsolete since JSAPI 17JSCLASS_MARK_IS_TRACE
Obsolete since JSAPI 5The behavior of a JSClass
and its instances can be customized in many ways using callback functions.
JSClass
method types:
JSPropertyOp
JSStrictPropertyOp
Added in SpiderMonkey 1.9.3JSDeletePropertyOp
Added in SpiderMonkey 24JSEnumerateOp
JSNewEnumerateOp
JSResolveOp
JSConvertOp
JSFinalizeOp
JSHasInstanceOp
JSTraceOp
JSCheckAccessOp
ObsoleteJSXDRObjectOp
Obsolete since JSAPI 13JSNewResolveOp
Obsolete since JSAPI 36JSMarkOp
Obsolete since JSAPI 5JSGetObjectOps
Obsolete since JavaScript 1.8.5JSReserveSlotsOp
Obsolete since JavaScript 1.8.5These stub functions can be used when creating a custom JSClass
:
JS_ConvertStub
Obsolete since JSAPI 37JS_DeletePropertyStub
Obsolete since JSAPI 37JS_EnumerateStub
Obsolete since JSAPI 37JS_FinalizeStub
Obsolete since JSAPI 15JS_ResolveStub
Obsolete since JSAPI 37JSExtendedClass
method types:
In JS 1.8.5, JSExtendedClass
has made private.
JSIteratorOp
Obsolete since JSAPI 26JSEqualityOp
Obsolete since JavaScript 1.8.5JSObjectOp
Obsolete since JavaScript 1.8.5JSObjectOps
method types:
In JS 1.8.5, JSObjectOps
has been made private.
JSNewObjectMapOp
Obsolete since JavaScript 1.8.5JSObjectMapOp
Obsolete since JavaScript 1.8.5JSLookupPropOp
Obsolete since JavaScript 1.8.5JSDefinePropOp
Obsolete since JavaScript 1.8.5JSPropertyIdOp
Obsolete since JavaScript 1.8.5JSAttributesOp
Obsolete since JavaScript 1.8.5JSObjectOps.defaultValue
Obsolete since JavaScript 1.8.5JSCheckAccessIdOp
Obsolete since JavaScript 1.8.5JSObjectOp
Obsolete since JavaScript 1.8.5JSPropertyRefOp
Obsolete since JavaScript 1.8.5JSSetObjectSlotOp
Obsolete since JavaScript 1.8.5JSGetRequiredSlotOp
Obsolete since JavaScript 1.8.5JSSetRequiredSlotOp
Obsolete since JavaScript 1.8.5JSXMLObjectOps
method types:
In JS 1.8.5, JSXMLObjectOps
has been made private.
JSGetMethodOp
Obsolete since JavaScript 1.8.5JSSetMethodOp
Obsolete since JavaScript 1.8.5JSEnumerateValuesOp
Obsolete since JavaScript 1.8.5JSConcatenateOp
Obsolete since JavaScript 1.8.5JS_HasArrayLength
Obsolete since JSAPI 8JS_AliasElement
Obsolete since JSAPI 8JS_LookupElement
Obsolete since JSAPI 37JS_DeleteElement2
Obsolete since JSAPI 39Calling a function or a method of an object:
JS::CallArgs
Added in SpiderMonkey 17JS::CallArgsFromVp
Added in SpiderMonkey 17JS::Call
Added in SpiderMonkey 17JS::Construct
Added in SpiderMonkey 38JS_CallFunction
JS_CallFunctionName
JS_CallFunctionValue
JS::IsCallable
Added in SpiderMonkey 38JS::IsConstructor
Added in SpiderMonkey 38JS_IsNativeFunction
Added in SpiderMonkey 17JS_IsConstructor
Added in SpiderMonkey 24JS_BindCallable
Added in SpiderMonkey 17JS_IsBuiltinEvalFunction
Added in SpiderMonkey 17JS_IsBuiltinFunctionConstructor
Added in SpiderMonkey 17Function accessors:
JS_ObjectIsFunction
JS_GetFunctionArity
JS_GetFunctionId
JS_GetFunctionDisplayId
Added in SpiderMonkey 17JS_GetFunctionScript
Added in SpiderMonkey 38JS_GetFunctionObject
JS_GetFunctionFlags
Obsolete since JSAPI 19JS_GetFunctionName
Obsolete since JavaScript 1.8.5Creating functions:
JS::CloneFunctionObject
Added in SpiderMonkey 36JS_DefineFunction
JS_DefineUCFunction
JS_DefineFunctionById
Added in SpiderMonkey 17JS_DefineFunctions
PropertyDefinitionBehavior
Added in SpiderMonkey 38JS_NewFunction
JS::GetSelfHostedFunction
Added in JSAPI 31JS::NewFunctionFromSpec
Added in JSAPI 45JS_NewFunctionById
Added in SpiderMonkey 17 Obsolete since JSAPI 44JS_CloneFunctionObject
Obsolete since JSAPI 36JS_NewRegExpObject
JS_NewUCRegExpObject
JS_NewRegExpObjectNoStatics
JS_NewUCRegExpObjectNoStatics
JS_SetRegExpInput
JS_ClearRegExpStatics
JS_ObjectIsRegExp
Added in SpiderMonkey 17JS_GetRegExpFlags
Added in SpiderMonkey 17JS_GetRegExpSource
Added in SpiderMonkey 17JS_ExecuteRegExp
JS_ExecuteRegExpNoStatics
JS_ClearRegExpRoots
Obsolete since JavaScript 1.8.5JSStructuredCloneCallbacks
JSPrincipals
JS_SetObjectPrincipalsFinder
Obsolete since JavaScript 1.8JS_SetPrincipalsTranscoder
Obsolete since JavaScript 1.8JSAccessMode
Obsolete since JSAPI 29JS_CheckAccess
Obsolete since JSAPI 29JSObjectOps.checkAccess
Obsolete since JavaScript 1.8JSClass.checkAccess
Obsolete since JSAPI 29JS_SetCheckObjectAccessCallback
Obsolete since JavaScript 1.8Added in SpiderMonkey 1.8.1 Security callbacks are set per-runtime.
JSSecurityCallbacks
JS_GetSecurityCallbacks
Added in SpiderMonkey 13JS_SetSecurityCallbacks
Added in SpiderMonkey 13JS_SetContextSecurityCallbacks
Obsolete since JSAPI 13JS_GetRuntimeSecurityCallbacks
Obsolete since JSAPI 13JS_SetRuntimeSecurityCallbacks
Obsolete since JSAPI 13The following functions support the SpiderMonkey threading model.
Note: JS_THREADSAFE is now permanently on and the JSRuntime is single-threaded. To execute more than one JS script at once, use multiple JSRuntimes.
JSAPI 1.7 and earlier They are only available in
builds.JS_THREADSAFE
Added in SpiderMonkey 1.8 These functions are always available, but in non-
builds, they do nothing.JS_THREADSAFE
JS_BeginRequest
JS_EndRequest
JS_YieldRequest
Obsolete since JSAPI 18JS_SuspendRequest
Obsolete since JSAPI 18JS_ResumeRequest
Obsolete since JSAPI 18JS_GetContextThread
Obsolete since JSAPI 8JS_SetContextThread
Obsolete since JSAPI 8JS_ClearContextThread
Obsolete since JSAPI 8The following functions are always available, but in non-
builds, they do nothing:JS_THREADSAFE
JS_LockRuntime
Obsolete since JSAPI 12JS_UnlockRuntime
Obsolete since JSAPI 12JS_Lock
Obsolete since JSAPI 12JS_Unlock
Obsolete since JSAPI 12Native function types:
JSNative
JSFastNative
Obsolete since JavaScript 1.8.5Other callback types:
JS::LargeAllocationFailureCallback
JS::SetLargeAllocationFailureCallback
Added in SpiderMonkey 31JS::OffThreadCompileCallback
JS::CompileOffThread
Added in SpiderMonkey 26JS::SetOutOfMemoryCallback
JS::OutOfMemoryCallback
Added in SpiderMonkey 31JSCompartmentNameCallback
JS_SetCompartmentNameCallback
Added in SpiderMonkey 17JSContextCallback
JS_SetContextCallback
JSDestroyCompartmentCallback
JS_SetDestroyCompartmentCallback
Added in SpiderMonkey 17JSEnumerateDiagnosticMemoryCallback
JS_EnumerateDiagnosticMemoryRegions
Added in SpiderMonkey 17JSErrorCallback
JS_ReportErrorNumber
and friendsJSErrorReporter
JS_SetErrorReporter
JSGCCallback
JS_SetGCCallback
JSFinalizeCallback
Added in SpiderMonkey 17JS_AddFinalizeCallback
Added in SpiderMonkey 38JS_SetFinalizeCallback
Added in SpiderMonkey 17 Obsolete since JSAPI 32JSIterateCompartmentCallback
JS_IterateCompartments
Added in SpiderMonkey 17JSBranchCallback
JS_SetBranchCallback
Obsolete since JavaScript 1.8.1JSArgumentFormatter
JS_AddArgumentFormatter
Obsolete since JSAPI 18JSFunctionCallback
JS_SetFunctionCallback
Obsolete since JSAPI 37JSGCRootMapFun
JS_MapGCRoots
Obsolete since JSAPI 19JSObjectPrincipalsFinder
JS_SetObjectPrincipalsFinder
Obsolete since JavaScript 1.8JSPrincipalsTranscoder
JS_SetPrincipalsTranscoder
Obsolete since JavaScript 1.8JSStringFinalizeOp
JS_AddExternalStringFinalizer
Obsolete since JSAPI 13JSTraceCallback
JS_TRACER_INIT
Obsolete since JSAPI 12JSTraceDataOp
JS_SetExtraGCRoots
Obsolete since JSAPI 25JSTraceNamePrinter
JS_SET_TRACING_DETAILS
Obsolete since JSAPI 26See also Classes, above.
JS_DEFAULT_XML_NAMESPACE_ID
Obsolete since JSAPI 21JSFUN_BOUND_METHOD
Obsolete since JavaScript 1.8.5JSFUN_GETTER
Obsolete since JavaScript 1.8.5JSFUN_SETTER
Obsolete since JavaScript 1.8.5JSFUN_GLOBAL_PARENT
Obsolete since JavaScript 1.8.5JSFUN_HEAVYWEIGHT
Obsolete since JSAPI 19JSFUN_LAMBDA
Obsolete since JSAPI 19JSAutoRequest
JSAutoLocalRootScope
Obsolete since JavaScript 1.8.5jsperf.h
)JS_SetFunctionCallback
Added in SpiderMonkey 1.8.5 Obsolete since JSAPI 37JS_GetFunctionCallback
Added in SpiderMonkey 1.8.5 Obsolete since JSAPI 37