aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/mozilla/projects/spidermonkey/jsapi_reference/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/mozilla/projects/spidermonkey/jsapi_reference/index.html')
-rw-r--r--files/zh-cn/mozilla/projects/spidermonkey/jsapi_reference/index.html646
1 files changed, 646 insertions, 0 deletions
diff --git a/files/zh-cn/mozilla/projects/spidermonkey/jsapi_reference/index.html b/files/zh-cn/mozilla/projects/spidermonkey/jsapi_reference/index.html
new file mode 100644
index 0000000000..d076928fba
--- /dev/null
+++ b/files/zh-cn/mozilla/projects/spidermonkey/jsapi_reference/index.html
@@ -0,0 +1,646 @@
+---
+title: JSAPI 参考
+slug: Mozilla/Projects/SpiderMonkey/JSAPI_reference
+translation_of: Mozilla/Projects/SpiderMonkey/JSAPI_reference
+---
+<p><strong>JSAPI</strong>是<strong> </strong><a href="/en/SpiderMonkey" title="en/SpiderMonkey">SpiderMonkey</a> JavaScript 引擎的C 语言应用程序接口(API)。要了解如何使用JSAPI ,请看 <a href="/En/SpiderMonkey/JSAPI_User_Guide" title="en/JSAPI_User_Guide">JSAPI User Guide</a> and the <a href="/En/SpiderMonkey/JSAPI_Phrasebook" title="en/JSAPI_Phrasebook">JSAPI Phrasebook</a>。</p>
+<p><br>
+ <a href="/En/SpiderMonkey/JSAPI_Reference/Alphabetical_List" title="en/JSAPI_Reference/Alphabetical_List">Alphabetical List</a></p>
+<h3 id="Runtimes_and_contexts" name="Runtimes_and_contexts">运行时和上下文</h3>
+<ul>
+ <li>typedef <a href="/en/SpiderMonkey/JSAPI_Reference/JSRuntime" title="en/JSRuntime">JSRuntime</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewRuntime" title="en/JS_NewRuntime">JS_NewRuntime</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DestroyRuntime" title="en/JS_DestroyRuntime">JS_DestroyRuntime</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ShutDown" title="en/JS_ShutDown">JS_ShutDown</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetRuntimePrivate" title="en/JS_GetRuntimePrivate">JS_GetRuntimePrivate</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetRuntimePrivate" title="en/JS_GetRuntimePrivate">JS_SetRuntimePrivate</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_Init" title="en/JS_Init">JS_Init</a> {{ Deprecated_inline() }}</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_Finish" title="en/JS_Finish">JS_Finish</a> {{ Deprecated_inline() }}</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ContextIterator" title="en/JS_ContextIterator">JS_ContextIterator</a></li>
+</ul>
+<ul>
+ <li>typedef <a href="/en/SpiderMonkey/JSAPI_Reference/JSRuntime" title="en/JSRuntime">JSContext</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewContext" title="en/JS_NewContext">JS_NewContext</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DestroyContext" title="en/JS_DestroyContext">JS_DestroyContext</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DestroyContext" title="en/JS_DestroyContext">JS_DestroyContextMaybeGC</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DestroyContext" title="en/JS_DestroyContext">JS_DestroyContextNoGC</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetRuntime" title="en/JS_GetRuntime">JS_GetRuntime</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetContextPrivate" title="en/JS_GetContextPrivate">JS_GetContextPrivate</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetContextPrivate" title="en/JS_GetContextPrivate">JS_SetContextPrivate</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetOptions" title="en/JS_GetOptions">JS_GetOptions</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOptions" title="en/JS_SetOptions">JS_SetOptions</a> – <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOptions" title="en/JS_SetOptions">JSOPTION_ATLINE</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOptions" title="en/JS_SetOptions">JSOPTION_COMPILE_N_GO</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOptions" title="en/JS_SetOptions">JSOPTION_DONT_REPORT_UNCAUGHT</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOptions" title="en/JS_SetOptions">JSOPTION_NATIVE_BRANCH_CALLBACK</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOptions" title="en/JSOPTION_RELIMIT">JSOPTION_RELIMIT</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOptions" title="en/JS_SetOptions">JSOPTION_STRICT</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOptions" title="en/JS_SetOptions">JSOPTION_VAROBJFIX</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOptions" title="en/JS_SetOptions">JSOPTION_WERROR</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOptions" title="en/JS_SetOptions">JSOPTION_XML</a></li>
+ <li><a href="/En/SpiderMonkey/JSAPI_Reference/JS_ToggleOptions" title="en/JS_ToggleOptions">JS_ToggleOptions</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetBranchCallback" title="en/JS_SetBranchCallback">JS_SetBranchCallback</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOperationCallback" title="en/JS_SetOperationCallback">JS_SetOperationCallback</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOperationCallback" title="en/JS_SetOperationCallback">JS_ClearOperationCallback</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOperationCallback" title="en/JS_SetOperationCallback">JS_GetOperationCallback</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOperationCallback" title="en/JS_SetOperationCallback">JS_GetOperationLimit</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOperationCallback" title="en/JS_SetOperationCallback">JS_SetOperationLimit</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOperationCallback" title="en/JS_SetOperationCallback">JS_MAX_OPERATION_LIMIT</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetOperationCallback" title="en/JS_SetOperationCallback">JS_OPERATION_WEIGHT_BASE</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetThreadStackLimit" title="en/JS_SetThreadStackLimit">JS_SetThreadStackLimit</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetScriptStackQuota" title="en/JS_SetScriptStackQuota">JS_SetScriptStackQuota</a></li>
+</ul>
+<ul>
+ <li>enum <a href="/en/SpiderMonkey/JSAPI_Reference/JSVersion" title="en/JSVersion">JSVersion</a>, <a href="/en/JSVERSION_ECMA_3" title="en/JSVERSION_ECMA_3">JSVERSION_ECMA_3</a>, <a href="/en/JSVERSION_DEFAULT" title="en/JSVERSION_DEFAULT">JSVERSION_DEFAULT</a>, <a href="/en/JSVERSION_LATEST" title="en/JSVERSION_LATEST">JSVERSION_LATEST</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetImplementationVersion" title="en/JS_GetImplementationVersion">JS_GetImplementationVersion</a></li>
+ <li><a class="internal" href="/cn/SpiderMonkey/JSAPI%20%E5%8F%82%E8%80%83/JS%20GetVersion" title="cn/SpiderMonkey/JSAPI 参考/JS GetVersion">JS_GetVersion</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetVersion" title="en/JS_SetVersion">JS_SetVersion</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_StringToVersion" title="en/JS_StringToVersion">JS_StringToVersion</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_VersionToString" title="en/JS_VersionToString">JS_VersionToString</a></li>
+</ul>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetGlobalObject" title="en/JS_GetGlobalObject">JS_GetGlobalObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGlobalObject" title="en/JS_SetGlobalObject">JS_SetGlobalObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_InitClass" title="en/JS_InitClass">JS_InitClass</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_InitStandardClasses" title="en/JS_InitStandardClasses">JS_InitStandardClasses</a></li>
+ <li><a href="/en/JS_ResolveStandardClass" title="en/JS_ResolveStandardClass">JS_ResolveStandardClass</a></li>
+ <li><a href="/en/JS_EnumerateStandardClasses" title="en/JS_EnumerateStandardClasses">JS_EnumerateStandardClasses</a></li>
+ <li><a href="/en/JS_EnumerateResolvedStandardClasses" title="en/JS_EnumerateResolvedStandardClasses">JS_EnumerateResolvedStandardClasses</a></li>
+</ul>
+<ul>
+ <li><a href="/en/JS_IsAssigning" title="en/JS_IsAssigning">JS_IsAssigning</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_IsConstructing" title="en/JS_IsConstructing">JS_IsConstructing</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_IsRunning" title="en/JS_IsRunning">JS_IsRunning</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetScopeChain" title="en/JS_GetScopeChain">JS_GetScopeChain</a></li>
+ <li><a href="/en/JS_SaveFrameChain" title="en/JS_SaveFrameChain">JS_SaveFrameChain</a>, <a href="/en/JS_RestoreFrameChain" title="en/JS_RestoreFrameChain">JS_RestoreFrameChain</a></li>
+</ul>
+<p>Locale callbacks:</p>
+<ul>
+ <li>struct <a href="/en/JSLocaleCallbacks" title="en/JSLocaleCallbacks">JSLocaleCallbacks</a></li>
+ <li><a href="/en/JS_GetLocaleCallbacks" title="en/JS_GetLocaleCallbacks">JS_GetLocaleCallbacks</a></li>
+ <li><a href="/en/JS_SetLocaleCallbacks" title="en/JS_SetLocaleCallbacks">JS_SetLocaleCallbacks</a></li>
+</ul>
+<p>Locale callback types:</p>
+<ul>
+ <li><a href="/en/JSLocaleToUpperCase" title="en/JSLocaleToUpperCase">JSLocaleToUpperCase</a></li>
+ <li><a href="/en/JSLocaleToLowerCase" title="en/JSLocaleToLowerCase">JSLocaleToLowerCase</a></li>
+ <li><a href="/en/JSLocaleCompare" title="en/JSLocaleCompare">JSLocaleCompare</a></li>
+ <li><a href="/en/JSLocaleToUnicode" title="en/JSLocaleToUnicode">JSLocaleToUnicode</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ReportErrorNumber" title="en/JS_ReportErrorNumber">JSErrorCallback</a></li>
+</ul>
+<h3 id="Scripts" name="Scripts">脚本</h3>
+<p>Just running some JavaScript code is straightforward:</p>
+<p>只是运行一些JavaScript代码很简单:</p>
+<ul>
+ <li><a class="internal" href="/Cn/SpiderMonkey/JSAPI_%E5%8F%82%E8%80%83/JS_EvaluateScript" title="cn/SpiderMonkey/JSAPI 参考/JS EvaluateScript">JS_EvaluateScript</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_EvaluateScript" title="en/JS_EvaluateScript">JS_EvaluateUCScript</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_EvaluateScriptForPrincipals" title="en/JS_EvaluateScriptForPrincipals">JS_EvaluateScriptForPrincipals</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_EvaluateScriptForPrincipals" title="en/JS_EvaluateScriptForPrincipals">JS_EvaluateUCScriptForPrincipals</a></li>
+</ul>
+<p>You can instead compile JavaScript code into a <code>JSScript</code> which you can then execute multiple times.</p>
+<p>你可以将JavaScript代码编译后保存在<code>JSScript类型的变量中,这样就可以多次执行。</code></p>
+<p>typedef <a href="/en/JSScript" title="en/JSScript">JSScript</a></p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompileFile" title="en/JS_CompileFile">JS_CompileFile</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompileFileHandle" title="en/JS_CompileFileHandle">JS_CompileFileHandle</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompileFileHandle" title="en/JS_CompileFileHandle">JS_CompileFileHandleForPrincipals</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompileScript" title="en/JS_CompileScript">JS_CompileScript</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompileScript" title="en/JS_CompileScript">JS_CompileUCScript</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompileScriptForPrincipals" title="en/JS_CompileScriptForPrincipals">JS_CompileScriptForPrincipals</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompileScriptForPrincipals" title="en/JS_CompileScriptForPrincipals">JS_CompileUCScriptForPrincipals</a></li>
+ <li><a href="/en/JS_BufferIsCompilableUnit" title="en/JS_BufferIsCompilableUnit">JS_BufferIsCompilableUnit</a></li>
+ <li><a href="/en/JS_GetScriptObject" title="en/JS_GetScriptObject">JS_GetScriptObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewScriptObject" title="en/JS_NewScriptObject">JS_NewScriptObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ExecuteScript" title="en/JS_ExecuteScript">JS_ExecuteScript</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ExecuteScriptPart" title="en/JS_ExecuteScriptPart">JS_ExecuteScriptPart</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DecompileScript" title="en/JS_DecompileScript">JS_DecompileScript</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DestroyScript" title="en/JS_DestroyScript">JS_DestroyScript</a></li>
+</ul>
+<p>You can also compile JavaScript code into a function:</p>
+<ul>
+ <li>typedef <a href="/en/JSFunction" title="en/JSFunction">JSFunction</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompileFunction" title="en/JS_CompileFunction">JS_CompileFunction</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompileFunctionForPrincipals" title="en/JS_CompileFunctionForPrincipals">JS_CompileFunctionForPrincipals</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompileFunction" title="en/JS_CompileFunction">JS_CompileUCFunction</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompileFunctionForPrincipals" title="en/JS_CompileFunctionForPrincipals">JS_CompileUCFunctionForPrincipals</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DecompileFunction" title="en/JS_DecompileFunction">JS_DecompileFunction</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DecompileFunctionBody" title="en/JS_DecompileFunctionBody">JS_DecompileFunctionBody</a></li>
+</ul>
+<p> </p>
+<h3 id="Error_handling" name="Error_handling">错误处理</h3>
+<ul>
+ <li>struct <a href="/en/SpiderMonkey/JSAPI_Reference/JSErrorReport" title="en/JSErrorReport">JSErrorReport</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ReportError" title="en/JS_ReportError">JS_ReportError</a></li>
+ <li><a href="/en/JS_ReportWarning" title="en/JS_ReportWarning">JS_ReportWarning</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ReportErrorNumber" title="en/JS_ReportErrorNumber">JS_ReportErrorNumber</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_ReportErrorNumber" title="en/JS_ReportErrorNumber">JS_ReportErrorNumberUC</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_ReportErrorNumber" title="en/JS_ReportErrorNumber">JS_ReportErrorFlagsAndNumber</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_ReportErrorNumber" title="en/JS_ReportErrorNumber">JS_ReportErrorFlagsAndNumberUC</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ReportOutOfMemory" title="en/JS_ReportOutOfMemory">JS_ReportOutOfMemory</a></li>
+ <li><a class="internal" href="/cn/SpiderMonkey/JSAPI%20%E5%8F%82%E8%80%83/JS_%20SetErrorReporter" title="cn/SpiderMonkey/JSAPI 参考/JS SetErrorReporter">JS_SetErrorReporter</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSREPORT_IS_EXCEPTION" title="en/JSREPORT_IS_EXCEPTION">JSREPORT_IS_EXCEPTION</a></li>
+ <li><a href="/en/JSREPORT_IS_STRICT" title="en/JSREPORT_IS_STRICT">JSREPORT_IS_STRICT</a></li>
+ <li><a href="/en/JSREPORT_IS_WARNING" title="en/JSREPORT_IS_WARNING">JSREPORT_IS_WARNING</a></li>
+</ul>
+<p>The following functions allow C/C++ functions to throw and catch JavaScript exceptions:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_IsExceptionPending" title="en/JS_IsExceptionPending">JS_IsExceptionPending</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPendingException" title="en/JS_GetPendingException">JS_GetPendingException</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetPendingException" title="en/JS_SetPendingException">JS_SetPendingException</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ClearPendingException" title="en/JS_ClearPendingException">JS_ClearPendingException</a></li>
+ <li><a href="/en/JS_ThrowStopIteration" title="en/JS_ThrowStopIteration">JS_ThrowStopIteration</a></li>
+</ul>
+<ul>
+ <li>typedef <a href="/en/SpiderMonkey/JSAPI_Reference/JSExceptionState" title="en/JSExceptionState">JSExceptionState</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SaveExceptionState" title="en/JS_SaveExceptionState">JS_SaveExceptionState</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_RestoreExceptionState" title="en/JS_RestoreExceptionState">JS_RestoreExceptionState</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DropExceptionState" title="en/JS_DropExceptionState">JS_DropExceptionState</a></li>
+</ul>
+<p>These functions translate errors into exceptions and vice versa:</p>
+<ul>
+ <li><a href="/en/JS_ReportPendingException" title="en/JS_ReportPendingException">JS_ReportPendingException</a></li>
+ <li><a href="/en/JS_ErrorFromException" title="en/JS_ErrorFromException">JS_ErrorFromException</a></li>
+ <li><a href="/en/JS_ThrowReportedError" title="en/JS_ThrowReportedError">JS_ThrowReportedError</a></li>
+</ul>
+<h3 id="Values_and_types" name="Values_and_types">值和类型</h3>
+<ul>
+ <li>typedef <a href="/En/SpiderMonkey/JSAPI_Reference/Jsval" title="en/jsval">jsval</a></li>
+</ul>
+<p><code>jsval</code> constants:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_NULL" title="en/JSVAL_NULL">JSVAL_NULL</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_VOID" title="en/JSVAL_VOID">JSVAL_VOID</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_TRUE" title="en/JSVAL_TRUE">JSVAL_TRUE</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_TRUE" title="en/JSVAL_TRUE">JSVAL_FALSE</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_ZERO" title="en/JSVAL_ZERO">JSVAL_ZERO</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_ONE" title="en/JSVAL_ONE">JSVAL_ONE</a></li>
+</ul>
+<p>Function and macros for checking the type of a <code>jsval</code>:</p>
+<ul>
+ <li>enum <a href="/en/SpiderMonkey/JSAPI_Reference/JSType" title="en/JSType">JSType</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_TypeOfValue" title="en/JS_TypeOfValue">JS_TypeOfValue</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_IS_NULL" title="en/JSVAL_IS_NULL">JSVAL_IS_NULL</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_IS_VOID" title="en/JSVAL_IS_VOID">JSVAL_IS_VOID</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_IS_BOOLEAN" title="en/JSVAL_IS_BOOLEAN">JSVAL_IS_BOOLEAN</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_IS_NUMBER" title="en/JSVAL_IS_NUMBER">JSVAL_IS_NUMBER</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_IS_INT" title="en/JSVAL_IS_INT">JSVAL_IS_INT</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_IS_DOUBLE" title="en/JSVAL_IS_DOUBLE">JSVAL_IS_DOUBLE</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_IS_STRING" title="en/JSVAL_IS_STRING">JSVAL_IS_STRING</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_IS_OBJECT" title="en/JSVAL_IS_OBJECT">JSVAL_IS_OBJECT</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_IS_PRIMITIVE" title="en/JSVAL_IS_PRIMITIVE">JSVAL_IS_PRIMITIVE</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_IS_GCTHING" title="en/JSVAL_IS_GCTHING">JSVAL_IS_GCTHING</a></li>
+</ul>
+<p>High-level type-conversion routines for packing and unpacking function arguments.</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_PushArguments" title="en/JS_PushArguments">JS_PushArguments</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_PushArguments" title="en/JS_PushArguments">JS_PushArgumentsVA</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_PopArguments" title="en/JS_PopArguments">JS_PopArguments</a></li>
+</ul>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ConvertArguments" title="en/JS_ConvertArguments">JS_ConvertArguments</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ConvertArgumentsVA" title="en/JS_ConvertArgumentsVA">JS_ConvertArgumentsVA</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_AddArgumentFormatter" title="en/JS_AddArgumentFormatter">JS_AddArgumentFormatter</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_AddArgumentFormatter" title="en/JS_AddArgumentFormatter">JS_RemoveArgumentFormatter</a></li>
+</ul>
+<p>The following functions convert JS values to various types. They can be safely applied to <code>jsval</code>s of any type. They may return new objects. For example, <code>JS_ValueToObject(cx, s)</code> where <code>s</code> is a string creates a new <code>String</code> wrapper object. These functions may call JavaScript methods. For example, <code>JS_ValueToString(cx, obj)</code> may call <code>obj.toString()</code>.</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ValueToBoolean" title="en/JS_ValueToBoolean">JS_ValueToBoolean</a></li>
+ <li><a href="/en/JS_ValueToConstructor" title="en/JS_ValueToConstructor">JS_ValueToConstructor</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ValueToECMAInt32" title="en/JS_ValueToECMAInt32">JS_ValueToECMAInt32</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ValueToECMAInt32" title="en/JS_ValueToECMAInt32">JS_ValueToECMAUint32</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ValueToFunction" title="en/JS_ValueToFunction">JS_ValueToFunction</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ValueToInt32" title="en/JS_ValueToInt32">JS_ValueToInt32</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ValueToNumber" title="en/JS_ValueToNumber">JS_ValueToNumber</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ValueToObject" title="en/JS_ValueToObject">JS_ValueToObject</a></li>
+ <li><a class="internal" href="/cn/SpiderMonkey/JSAPI%20%E5%8F%82%E8%80%83/JS%20ValueToString" title="cn/SpiderMonkey/JSAPI 参考/JS ValueToString">JS_ValueToString</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ValueToECMAInt32" title="en/JS_ValueToECMAInt32">JS_ValueToUint16</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ConvertValue" title="en/JS_ConvertValue">JS_ConvertValue</a></li>
+</ul>
+<p>Fast, 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.</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_TO_BOOLEAN" title="en/JSVAL_TO_BOOLEAN">JSVAL_TO_BOOLEAN</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/BOOLEAN_TO_JSVAL" title="en/BOOLEAN_TO_JSVAL">BOOLEAN_TO_JSVAL</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_TO_INT" title="en/JSVAL_TO_INT">JSVAL_TO_INT</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/INT_TO_JSVAL" title="en/INT_TO_JSVAL">INT_TO_JSVAL</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/INT_FITS_IN_JSVAL" title="en/INT_FITS_IN_JSVAL">INT_FITS_IN_JSVAL</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_TO_DOUBLE" title="en/JSVAL_TO_DOUBLE">JSVAL_TO_DOUBLE</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/DOUBLE_TO_JSVAL" title="en/DOUBLE_TO_JSVAL">DOUBLE_TO_JSVAL</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_TO_OBJECT" title="en/JSVAL_TO_OBJECT">JSVAL_TO_OBJECT</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/OBJECT_TO_JSVAL" title="en/OBJECT_TO_JSVAL">OBJECT_TO_JSVAL</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_TO_STRING" title="en/JSVAL_TO_STRING">JSVAL_TO_STRING</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/STRING_TO_JSVAL" title="en/STRING_TO_JSVAL">STRING_TO_JSVAL</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_TO_GCTHING" title="en/JSVAL_TO_GCTHING">JSVAL_TO_GCTHING</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/PRIVATE_TO_JSVAL" title="en/PRIVATE_TO_JSVAL">JSVAL_TO_PRIVATE</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/PRIVATE_TO_JSVAL" title="en/PRIVATE_TO_JSVAL">PRIVATE_TO_JSVAL</a></li>
+</ul>
+<p>And:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetTypeName" title="en/JS_GetTypeName">JS_GetTypeName</a></li>
+</ul>
+<h3 id="Memory_management" name="Memory_management">Memory management</h3>
+<p>These functions act like the Standard C <code>malloc</code> family of functions, except that errors are reported using the SpiderMonkey error APIs rather than <code>errno</code>. These functions also allow SpiderMonkey to account the number of bytes allocated:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_malloc" title="en/JS_malloc">JS_malloc</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_free" title="en/JS_free">JS_free</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_realloc" title="en/JS_realloc">JS_realloc</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_strdup" title="en/JS_strdup">JS_strdup</a></li>
+</ul>
+<p>JavaScript objects, strings, and floating-point numbers are garbage collected. These functions provide access to the garbage collector:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GC" title="en/JS_GC">JS_GC</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_MaybeGC" title="en/JS_MaybeGC">JS_MaybeGC</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCParameter" title="en/JS_SetGCParameter">JS_SetGCParameter</a>, enum <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCParameter" title="en/JS_SetGCParameter">JSGCParamKey</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCParameter" title="en/JS_SetGCParameter">JSGC_MAX_BYTES</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCParameter" title="en/JS_SetGCParameter">JSGC_MAX_MALLOC_BYTES</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCParameter" title="en/JS_SetGCParameter">JSGC_STACKPOOL_LIFESPAN</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCCallback" title="en/JS_SetGCCallback">JS_SetGCCallback</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCCallback" title="en/JS_SetGCCallback">JS_SetGCCallbackRT</a>, enum <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCCallback" title="en/JS_SetGCCallback">JSGCStatus</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCCallback" title="en/JS_SetGCCallback">JSGC_BEGIN</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCCallback" title="en/JS_SetGCCallback">JSGC_MARK_END</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCCallback" title="en/JS_SetGCCallback">JSGC_FINALIZE_END</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCCallback" title="en/JS_SetGCCallback">JSGC_END</a></li>
+ <li><a href="/en/JS_MarkGCThing" title="en/JS_MarkGCThing">JS_MarkGCThing</a></li>
+ <li><a href="/en/JS_IsAboutToBeFinalized" title="en/JS_IsAboutToBeFinalized">JS_IsAboutToBeFinalized</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ClearNewbornRoots" title="en/JS_ClearNewbornRoots">JS_ClearNewbornRoots</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCZeal" title="en/JS_SetGCZeal">JS_SetGCZeal</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DumpHeap" title="en/JS_DumpHeap">JS_DumpHeap</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+</ul>
+<p>The rest of these APIs help protect objects from being destroyed by the garbage collector before the application is done using them.</p>
+<p>If a variable is a <em>root</em>, 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.</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_AddRoot" title="en/JS_AddRoot">JS_AddRoot</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_AddRoot" title="en/JS_AddRoot">JS_AddNamedRoot</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_AddRoot" title="en/JS_AddRoot">JS_AddNamedRootRT</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_RemoveRoot" title="en/JS_RemoveRoot">JS_RemoveRoot</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_RemoveRootRT" title="en/JS_RemoveRootRT">JS_RemoveRootRT</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_MapGCRoots" title="en/JS_MapGCRoots">JS_MapGCRoots</a>, <a href="/en/JSGCMapRootFun" title="en/JSGCMapRootFun">JSGCMapRootFun</a> – <a href="/en/JS_MAP_GCROOT_NEXT" title="en/JS_MAP_GCROOT_NEXT">JS_MAP_GCROOT_NEXT</a>, <a href="/en/JS_MAP_GCROOT_REMOVE" title="en/JS_MAP_GCROOT_REMOVE">JS_MAP_GCROOT_REMOVE</a>, <a href="/en/JS_MAP_GCROOT_STOP" title="en/JS_MAP_GCROOT_STOP">JS_MAP_GCROOT_STOP</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DumpNamedRoots" title="en/JS_DumpNamedRoots">JS_DumpNamedRoots</a></li>
+</ul>
+<p>Local root scopes are another way of protecting objects from the garbage collector.</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_EnterLocalRootScope" title="en/JS_EnterLocalRootScope">JS_EnterLocalRootScope</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_LeaveLocalRootScope" title="en/JS_LeaveLocalRootScope">JS_LeaveLocalRootScope</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_LeaveLocalRootScopeWithResult" title="en/JS_LeaveLocalRootScopeWithResult">JS_LeaveLocalRootScopeWithResult</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ForgetLocalRoot" title="en/JS_ForgetLocalRoot">JS_ForgetLocalRoot</a></li>
+</ul>
+<p>{{ Jsapi_minversion_inline("1.8 (not yet released)") }} If an object contains references to other GC things that are not stored in SpiderMonkey data structures ("slots"), it must implement the <code><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.mark" title="en/JSClass.mark">JSTraceOp</a></code> 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 <code>JSMarkOp</code> hook is used instead. This will be deprecated when SpiderMonkey 1.8 is released.)</p>
+<p>The tracing APIs are used by the garbage collector and <code>JSTraceOp</code> 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.)</p>
+<ul>
+ <li><a href="/en/JSVAL_IS_TRACEABLE" title="en/JSVAL_IS_TRACEABLE">JSVAL_IS_TRACEABLE</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JSVAL_TO_TRACEABLE" title="en/JSVAL_TO_TRACEABLE">JSVAL_TO_TRACEABLE</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JSVAL_TRACE_KIND" title="en/JSVAL_TRACE_KIND">JSVAL_TRACE_KIND</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li>struct <a href="/en/JSTracer" title="en/JSTracer">JSTracer</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_TRACER_INIT" title="en/JS_TRACER_INIT">JS_TRACER_INIT</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JS_CallTracer" title="en/JS_CallTracer">JS_CallTracer</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SET_TRACING_DETAILS" title="en/JS_SET_TRACING_DETAILS">JS_SET_TRACING_DETAILS</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JS_SET_TRACING_INDEX" title="en/JS_SET_TRACING_INDEX">JS_SET_TRACING_INDEX</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JS_SET_TRACING_NAME" title="en/JS_SET_TRACING_NAME">JS_SET_TRACING_NAME</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JS_CALL_TRACER" title="en/JS_CALL_TRACER">JS_CALL_TRACER</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JS_CALL_VALUE_TRACER" title="en/JS_CALL_VALUE_TRACER">JS_CALL_VALUE_TRACER</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JS_CALL_OBJECT_TRACER" title="en/JS_CALL_OBJECT_TRACER">JS_CALL_OBJECT_TRACER</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JS_CALL_STRING_TRACER" title="en/JS_CALL_STRING_TRACER">JS_CALL_STRING_TRACER</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JS_CALL_DOUBLE_TRACER" title="en/JS_CALL_DOUBLE_TRACER">JS_CALL_DOUBLE_TRACER</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JS_TraceChildren" title="en/JS_TraceChildren">JS_TraceChildren</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JS_TraceRuntime" title="en/JS_TraceRuntime">JS_TraceRuntime</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/JS_PrintTraceThingInfo" title="en/JS_PrintTraceThingInfo">JS_PrintTraceThingInfo</a> (DEBUG-only) {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+</ul>
+<p>Miscellaneous GC APIs:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_LOCK" title="en/JSVAL_LOCK">JSVAL_LOCK</a> {{ Deprecated_inline() }}</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSVAL_UNLOCK" title="en/JSVAL_UNLOCK">JSVAL_UNLOCK</a> {{ Deprecated_inline() }}</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_LockGCThing" title="en/JS_LockGCThing">JS_LockGCThing</a> {{ Deprecated_inline() }}</li>
+ <li><a href="/en/JS_LockGCThingRT" title="en/JS_LockGCThingRT">JS_LockGCThingRT</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_LockGCThing" title="en/JS_LockGCThing">JS_UnlockGCThing</a> {{ Deprecated_inline() }}</li>
+ <li><a href="/en/JS_UnlockGCThingRT" title="en/JS_UnlockGCThingRT">JS_UnlockGCThingRT</a></li>
+</ul>
+<h3 id="Numbers" name="Numbers">Numbers</h3>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewNumberValue" title="en/JS_NewNumberValue">JS_NewNumberValue</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewDoubleValue" title="en/JS_NewDoubleValue">JS_NewDoubleValue</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewDouble" title="en/JS_NewDouble">JS_NewDouble</a></li>
+ <li>struct <a href="/en/SpiderMonkey/JSAPI_Reference/JSConstDoubleSpec" title="en/JSConstDoubleSpec">JSConstDoubleSpec</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DefineConstDoubles" title="en/JS_DefineConstDoubles">JS_DefineConstDoubles</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetNaNValue" title="en/JS_GetNaNValue">JS_GetNaNValue</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPositiveInfinityValue" title="en/JS_GetPositiveInfinityValue">JS_GetNegativeInfinityValue</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPositiveInfinityValue" title="en/JS_GetPositiveInfinityValue">JS_GetPositiveInfinityValue</a></li>
+</ul>
+<h3 id="Strings" name="Strings">字符串</h3>
+<ul>
+ <li>typedef <a href="/en/SpiderMonkey/JSAPI_Reference/JSString" title="en/JSString">JSString</a></li>
+ <li>typedef <a href="/en/SpiderMonkey/JSAPI_Reference/jschar" title="en/jschar">jschar</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewString" title="en/JS_NewString">JS_NewString</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewStringCopyN" title="en/JS_NewStringCopyN">JS_NewStringCopyN</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewStringCopyZ" title="en/JS_NewStringCopyZ">JS_NewStringCopyZ</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewString" title="en/JS_NewString">JS_NewUCString</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewStringCopyN" title="en/JS_NewStringCopyN">JS_NewUCStringCopyN</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewStringCopyZ" title="en/JS_NewStringCopyZ">JS_NewUCStringCopyZ</a></li>
+ <li><a href="/en/JS_NewGrowableString" title="en/JS_NewGrowableString">JS_NewGrowableString</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewDependentString" title="en/JS_NewDependentString">JS_NewDependentString</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetEmptyStringValue" title="en/JS_GetEmptyStringValue">JS_GetEmptyStringValue</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CompareStrings" title="en/JS_CompareStrings">JS_CompareStrings</a></li>
+ <li><a href="/en/JS_ConcatStrings" title="en/JS_ConcatStrings">JS_ConcatStrings</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetStringBytes" title="en/JS_GetStringBytes">JS_GetStringBytes</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetStringChars" title="en/JS_GetStringChars">JS_GetStringChars</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetStringLength" title="en/JS_GetStringLength">JS_GetStringLength</a></li>
+ <li><a href="/en/JS_MakeStringImmutable" title="en/JS_MakeStringImmutable">JS_MakeStringImmutable</a></li>
+ <li><a href="/en/JS_UndependString" title="en/JS_UndependString">JS_UndependString</a></li>
+</ul>
+<ul>
+ <li><a href="/en/JS_CStringsAreUTF8" title="en/JS_CStringsAreUTF8">JS_CStringsAreUTF8</a></li>
+ <li><a href="/en/JS_SetCStringsAreUTF8" title="en/JS_SetCStringsAreUTF8">JS_SetCStringsAreUTF8</a></li>
+ <li><a href="/en/JS_DecodeBytes" title="en/JS_DecodeBytes">JS_DecodeBytes</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_EncodeCharacters" title="en/JS_EncodeCharacters">JS_EncodeCharacters</a></li>
+ <li><a href="/en/JS_EncodeString" title="en/JS_EncodeString">JS_EncodeString</a></li>
+</ul>
+<p><em>Interning</em> strings tells the SpiderMonkey engine to reuse existing string objects when possible.</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_InternString" title="en/JS_InternString">JS_InternString</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_InternString" title="en/JS_InternString">JS_InternUCString</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_InternString" title="en/JS_InternString">JS_InternUCStringN</a></li>
+</ul>
+<p>The character data for <em>external strings</em> 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.</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_AddExternalStringFinalizer" title="en/JS_AddExternalStringFinalizer">JS_AddExternalStringFinalizer</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_RemoveExternalStringFinalizer" title="en/JS_RemoveExternalStringFinalizer">JS_RemoveExternalStringFinalizer</a></li>
+ <li><a href="/en/JS_GetExternalStringGCType" title="en/JS_GetExternalStringGCType">JS_GetExternalStringGCType</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewExternalString" title="en/JS_NewExternalString">JS_NewExternalString</a></li>
+</ul>
+<h3 id="Objects" name="Objects">对象</h3>
+<ul>
+ <li>typedef <a href="/en/SpiderMonkey/JSAPI_Reference/JSObject" title="en/JSObject">JSObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ConstructObject" title="en/JS_ConstructObject">JS_ConstructObject</a></li>
+ <li><a href="/en/JS_ConstructObjectWithArguments" title="en/JS_ConstructObjectWithArguments">JS_ConstructObjectWithArguments</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DefineObject" title="en/JS_DefineObject">JS_DefineObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewObject" title="en/JS_NewObject">JS_NewObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewObject" title="en/JS_NewObject">JS_NewObjectWithGivenProto</a></li>
+</ul>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GET_CLASS" title="en/JS_GET_CLASS">JS_GET_CLASS</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GET_CLASS" title="en/JS_GET_CLASS">JS_GetClass</a></li>
+ <li><a href="/en/JS_GetClassObject" title="en/JS_GetClassObject">JS_GetClassObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetConstructor" title="en/JS_GetConstructor">JS_GetConstructor</a></li>
+ <li><a href="/en/JS_GetGlobalForObject" title="en/JS_GetGlobalForObject">JS_GetGlobalForObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetInstancePrivate" title="en/JS_GetInstancePrivate">JS_GetInstancePrivate</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetParent" title="en/JS_GetParent">JS_GetParent</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetParent" title="en/JS_SetParent">JS_SetParent</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPrivate" title="en/JS_GetPrivate">JS_GetPrivate</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetPrivate" title="en/JS_SetPrivate">JS_SetPrivate</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPrototype" title="en/JS_GetPrototype">JS_GetPrototype</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetPrototype" title="en/JS_SetPrototype">JS_SetPrototype</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetReservedSlot" title="en/JS_GetReservedSlot">JS_GetReservedSlot</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetReservedSlot" title="en/JS_GetReservedSlot">JS_SetReservedSlot</a></li>
+ <li><a href="/en/JS_HasInstance" title="en/JS_HasInstance">JS_HasInstance</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_InstanceOf" title="en/JS_InstanceOf">JS_InstanceOf</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SealObject" title="en/JS_SealObject">JS_SealObject</a></li>
+</ul>
+<h3 id="Properties" name="Properties">属性</h3>
+<p>These functions correspond directly to the ways scripts access object properties:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetProperty" title="en/JS_GetProperty">JS_GetProperty</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetProperty" title="en/JS_GetProperty">JS_GetUCProperty</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetProperty" title="en/JS_SetProperty">JS_SetProperty</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetProperty" title="en/JS_SetProperty">JS_SetUCProperty</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_HasProperty" title="en/JS_HasProperty">JS_HasProperty</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_HasProperty" title="en/JS_HasProperty">JS_HasUCProperty</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DeleteProperty" title="en/JS_DeleteProperty">JS_DeleteProperty</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_DeleteProperty2" title="en/JS_DeleteProperty2">JS_DeleteProperty2</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_DeleteProperty2" title="en/JS_DeleteProperty2">JS_DeleteUCProperty2</a></li>
+</ul>
+<p>The 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.</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_AlreadyHasOwnProperty" title="en/JS_AlreadyHasOwnElement">JS_AlreadyHasOwnElement</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_AlreadyHasOwnProperty" title="en/JS_AlreadyHasOwnProperty">JS_AlreadyHasOwnProperty</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_AlreadyHasOwnProperty" title="en/JS_AlreadyHasOwnProperty">JS_AlreadyHasOwnUCProperty</a> {{ Jsapi_minversion_inline("1.8 (not yet released)") }}</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ClearScope" title="en/JS_ClearScope">JS_ClearScope</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DefineProperties" title="en/JS_DefineProperties">JS_DefineProperties</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DefineProperty" title="en/JS_DefineProperty">JS_DefineProperty</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_DefineProperty" title="en/JS_DefineProperty">JS_DefineUCProperty</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DefinePropertyWithTinyId" title="en/JS_DefinePropertyWithTinyId">JS_DefinePropertyWithTinyId</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_DefinePropertyWithTinyId" title="en/JS_DefinePropertyWithTinyId">JS_DefineUCPropertyWithTinyId</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_Enumerate" title="en/JS_Enumerate">JS_Enumerate</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttributes" title="en/JS_GetPropertyAttributes">JS_GetPropertyAttributes</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttributes" title="en/JS_GetPropertyAttributes">JS_GetUCPropertyAttributes</a> – <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttributes" title="en/JS_GetPropertyAttributes">JSPROP_ENUMERATE</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttributes" title="en/JS_GetPropertyAttributes">JSPROP_EXPORTED</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttributes" title="en/JS_GetPropertyAttributes">JSPROP_GETTER</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttributes" title="en/JS_GetPropertyAttributes">JSPROP_INDEX</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttributes" title="en/JS_GetPropertyAttributes">JSPROP_PERMANENT</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttributes" title="en/JS_GetPropertyAttributes">JSPROP_READONLY</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttributes" title="en/JS_GetPropertyAttributes">JSPROP_SETTER</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttributes" title="en/JS_GetPropertyAttributes">JSPROP_SHARED</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttrsGetterAndSetter" title="en/JS_GetPropertyAttrsGetterAndSetter">JS_GetPropertyAttrsGetterAndSetter</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetPropertyAttrsGetterAndSetter" title="en/JS_GetPropertyAttrsGetterAndSetter">JS_GetUCPropertyAttrsGetterAndSetter</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_LookupProperty" title="en/JS_LookupProperty">JS_LookupProperty</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_LookupProperty" title="en/JS_LookupProperty">JS_LookupUCProperty</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_LookupProperty" title="en/JS_LookupProperty">JS_LookupPropertyWithFlags</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewPropertyIterator" title="en/JS_NewPropertyIterator">JS_NewPropertyIterator</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NextProperty" title="en/JS_NextProperty">JS_NextProperty</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetPropertyAttributes" title="en/JS_SetPropertyAttributes">JS_SetPropertyAttributes</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetPropertyAttributes" title="en/JS_SetPropertyAttributes">JS_SetUCPropertyAttributes</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_AliasProperty" title="en/JS_AliasProperty">JS_AliasProperty</a> {{ Deprecated_inline() }}</li>
+</ul>
+<p>The following functions behave like <code>JS_GetProperty</code> except when operating on E4X XML objects.</p>
+<ul>
+ <li><a href="/en/JS_GetMethod" title="en/JS_GetMethod">JS_GetMethod</a>, <a href="/en/JS_GetMethodById" title="en/JS_GetMethodById">JS_GetMethodById</a></li>
+</ul>
+<p>A SpiderMonkey extension allows a native function to return an lvalue—that is, a reference to a property of an object:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetCallReturnValue2" title="en/JS_SetCallReturnValue2">JS_SetCallReturnValue2</a></li>
+</ul>
+<p>A <code><a href="/en/SpiderMonkey/JSAPI_Reference/jsid" title="en/jsid">jsid</a></code> is kind of like a <code>jsval</code>, only different. A handful of APIs use <code>jsid</code>s instead of <code>jsval</code>s for property names: <code><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CheckAccess" title="en/JS_CheckAccess">JS_CheckAccess</a></code>, <code><a href="/en/SpiderMonkey/JSAPI_Reference/JS_Enumerate" title="en/JS_Enumerate">JS_Enumerate</a></code>, <code><a href="/en/JS_GetMethodById" title="en/JS_GetMethodById">JS_GetMethodById</a></code>, and <code><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NextProperty" title="en/JS_NextProperty">JS_NextProperty</a></code>.</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_IdToValue" title="en/JS_IdToValue">JS_IdToValue</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_ValueToId" title="en/JS_ValueToId">JS_ValueToId</a></li>
+ <li><a href="/en/JS_GetObjectId" title="en/JS_GetObjectId">JS_GetObjectId</a></li>
+ <li>struct <a href="/en/SpiderMonkey/JSAPI_Reference/JSIdArray" title="en/JSIdArray">JSIdArray</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DestroyIdArray" title="en/JS_DestroyIdArray">JS_DestroyIdArray</a></li>
+</ul>
+<h3 id="Classes" name="Classes">Classes</h3>
+<p>These API features are used to define custom classes—object types that are implemented in C/C++ code but accessible from JavaScript.</p>
+<ul>
+ <li>struct <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass" title="en/JSClass">JSClass</a></li>
+ <li>struct <a href="/en/SpiderMonkey/JSAPI_Reference/JSExtendedClass" title="en/JSExtendedClass">JSExtendedClass</a></li>
+ <li>struct <a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps" title="en/JSObjectOps">JSObjectOps</a></li>
+ <li>struct <a href="/en/SpiderMonkey/JSAPI_Reference/JSXMLObjectOps" title="en/JSXMLObjectOps">JSXMLObjectOps</a></li>
+ <li>struct <a href="/en/JSFunctionSpec" title="en/JSFunctionSpec">JSFunctionSpec</a></li>
+ <li>struct <a href="/en/SpiderMonkey/JSAPI_Reference/JSProperty" title="en/JSProperty">JSProperty</a></li>
+ <li>struct <a href="/en/SpiderMonkey/JSAPI_Reference/JSPropertySpec" title="en/JSPropertySpec">JSPropertySpec</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_InitClass" title="en/JS_InitClass">JS_InitClass</a></li>
+</ul>
+<p>Adding native properties and methods to classes:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSNative" title="en/JSNative">JSNative</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSFastNative" title="en/JSFastNative">JSFastNative</a></li>
+ <li>struct <a href="/en/JSFunctionSpec" title="en/JSFunctionSpec">JSFunctionSpec</a></li>
+ <li><a href="/en/JS_FS" title="en/JS_FS">JS_FS</a></li>
+ <li><a href="/en/JS_FN" title="en/JS_FN">JS_FN</a></li>
+ <li><a href="/en/JS_FS_END" title="en/JS_FS_END">JS_FS_END</a></li>
+ <li>struct <a href="/en/SpiderMonkey/JSAPI_Reference/JSPropertySpec" title="en/JSPropertySpec">JSPropertySpec</a></li>
+</ul>
+<p><code>JSFastNative</code> methods use these macros:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSFastNative" title="en/JSFastNative">JS_CALLEE</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSFastNative" title="en/JSFastNative">JS_THIS</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSFastNative" title="en/JSFastNative">JS_THIS_OBJECT</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSFastNative" title="en/JSFastNative">JS_ARGV</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSFastNative" title="en/JSFastNative">JS_RVAL</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSFastNative" title="en/JSFastNative">JS_SET_RVAL</a></li>
+</ul>
+<p>The behavior of a <code>JSClass</code> and its instances can be customized in many ways using callback functions.</p>
+<p><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass" title="en/JSClass">JSClass</a> method types:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.addProperty" title="en/JSClass.addProperty">JSPropertyOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSEnumerateOp" title="en/JSEnumerateOp">JSEnumerateOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.enumerate" title="en/JSClass.enumerate">JSNewEnumerateOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.resolve" title="en/JSClass.resolve">JSResolveOp</a></li>
+ <li><a href="/En/SpiderMonkey/JSAPI_Reference/JSNewResolveOp" title="en/JSNewResolveOp">JSNewResolveOp</a> – <a href="/En/SpiderMonkey/JSAPI_Reference/JSNewResolveOp" title="en/JSNewResolveOp">JSRESOLVE_ASSIGNING</a>, <a href="/En/SpiderMonkey/JSAPI_Reference/JSNewResolveOp" title="en/JSNewResolveOp">JSRESOLVE_CLASSNAME</a>, <a href="/En/SpiderMonkey/JSAPI_Reference/JSNewResolveOp" title="en/JSNewResolveOp">JSRESOLVE_DECLARING</a>, <a href="/En/SpiderMonkey/JSAPI_Reference/JSNewResolveOp" title="en/JSNewResolveOp">JSRESOLVE_DETECTING</a>, <a href="/En/SpiderMonkey/JSAPI_Reference/JSNewResolveOp" title="en/JSNewResolveOp">JSRESOLVE_QUALIFIED</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.defaultValue" title="en/JSObjectOps.defaultValue">JSConvertOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.finalize" title="en/JSClass.finalize">JSFinalizeOp</a></li>
+ <li><a href="/en/JSClass.getObjectOps" title="en/JSClass.getObjectOps">JSGetObjectOps</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.checkAccess" title="en/JSClass.checkAccess">JSCheckAccessOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.xdrObject" title="en/JSClass.xdrObject">JSXDRObjectOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.hasInstance" title="en/JSClass.hasInstance">JSHasInstanceOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.mark" title="en/JSClass.mark">JSMarkOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSTraceOp" title="en/JSTraceOp">JSTraceOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.reserveSlots" title="en/JSClass.reserveSlots">JSReserveSlotsOp</a></li>
+</ul>
+<p><a href="/en/SpiderMonkey/JSAPI_Reference/JSExtendedClass" title="en/JSExtendedClass">JSExtendedClass</a> method types:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSExtendedClass.iteratorObject" title="en/JSExtendedClass.iteratorObject">JSIteratorOp</a></li>
+ <li><a href="/en/JSEqualityOp" title="en/JSEqualityOp">JSEqualityOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOp" title="en/JSObjectOp">JSObjectOp</a></li>
+</ul>
+<p><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps" title="en/JSObjectOps">JSObjectOps</a> method types:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.newObjectMap" title="en/JSObjectOps.newObjectMap">JSNewObjectMapOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.destroyObjectMap" title="en/JSObjectOps.destroyObjectMap">JSObjectMapOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.lookupProperty" title="en/JSObjectOps.lookupProperty">JSLookupPropOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.defineProperty" title="en/JSObjectOps.defineProperty">JSDefinePropOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.getProperty" title="en/JSObjectOps.getProperty">JSPropertyIdOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.getAttributes" title="en/JSObjectOps.getAttributes">JSAttributesOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.defaultValue" title="en/JSObjectOps.defaultValue">JSConvertOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.enumerate" title="en/JSClass.enumerate">JSNewEnumerateOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.checkAccess" title="en/JSObjectOps.checkAccess">JSCheckAccessIdOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOp" title="en/JSObjectOp">JSObjectOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.dropProperty" title="en/JSObjectOps.dropProperty">JSPropertyRefOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.xdrObject" title="en/JSClass.xdrObject">JSXDRObjectOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.hasInstance" title="en/JSClass.hasInstance">JSHasInstanceOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.setProto" title="en/JSObjectOps.setProto">JSSetObjectSlotOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSTraceOp" title="en/JSTraceOp">JSTraceOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.finalize" title="en/JSClass.finalize">JSFinalizeOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.getRequiredSlot" title="en/JSObjectOps.getRequiredSlot">JSGetRequiredSlotOp</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.getRequiredSlot" title="en/JSObjectOps.getRequiredSlot">JSSetRequiredSlotOp</a></li>
+</ul>
+<p><a href="/en/SpiderMonkey/JSAPI_Reference/JSXMLObjectOps" title="en/JSXMLObjectOps">JSXMLObjectOps</a> method types:</p>
+<ul>
+ <li><a href="/en/JSGetMethodOp" title="en/JSGetMethodOp">JSGetMethodOp</a></li>
+ <li><a href="/en/JSSetMethodOp" title="en/JSSetMethodOp">JSSetMethodOp</a></li>
+ <li><a href="/en/JSEnumerateValuesOp" title="en/JSEnumerateValuesOp">JSEnumerateValuesOp</a></li>
+ <li><a href="/en/JSEqualityOp" title="en/JSEqualityOp">JSEqualityOp</a></li>
+ <li><a href="/en/JSConcatenateOp" title="en/JSConcatenateOp">JSConcatenateOp</a></li>
+</ul>
+<p>These stub functions can be used when creating a custom <code>JSClass</code>:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_PropertyStub" title="en/JS_PropertyStub">JS_ConvertStub</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_PropertyStub" title="en/JS_PropertyStub">JS_EnumerateStub</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_PropertyStub" title="en/JS_PropertyStub">JS_FinalizeStub</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_PropertyStub" title="en/JS_PropertyStub">JS_PropertyStub</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_PropertyStub" title="en/JS_PropertyStub">JS_ResolveStub</a></li>
+</ul>
+<p>The behavior of a <code>JSClass</code> can be customized using these flags:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSClass.flags</a> – <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSCLASS_CONSTUCT_PROTOTYPE</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSCLASS_GLOBAL_FLAGS</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSCLASS_HAS_PRIVATE</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSCLASS_HAS_RESERVED_SLOTS</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSCLASS_IS_EXTENDED</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSCLASS_MARK_IS_TRACE</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSCLASS_NEW_ENUMERATE</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSCLASS_NEW_RESOLVE</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSCLASS_NEW_RESOLVE_GETS_START</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSCLASS_PRIVATE_IS_NSISUPPORTS</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.flags" title="en/JSClass.flags">JSCLASS_SHARE_ALL_PROPERTIES</a></li>
+</ul>
+<h3 id="Arrays" name="Arrays">Arrays</h3>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewArrayObject" title="en/JS_NewArrayObject">JS_NewArrayObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_IsArrayObject" title="en/JS_IsArrayObject">JS_IsArrayObject</a></li>
+</ul>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_HasArrayLength" title="en/JS_HasArrayLength">JS_HasArrayLength</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetArrayLength" title="en/JS_GetArrayLength">JS_GetArrayLength</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetArrayLength" title="en/JS_SetArrayLength">JS_SetArrayLength</a></li>
+</ul>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_AliasElement" title="en/JS_AliasElement">JS_AliasElement</a> {{ Deprecated_inline() }}</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DefineElement" title="en/JS_DefineElement">JS_DefineElement</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DeleteElement" title="en/JS_DeleteElement">JS_DeleteElement</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DeleteElement2" title="en/JS_DeleteElement2">JS_DeleteElement2</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetElement" title="en/JS_GetElement">JS_GetElement</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_LookupElement" title="en/JS_LookupElement">JS_LookupElement</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetElement" title="en/JS_SetElement">JS_SetElement</a></li>
+</ul>
+<h3 id="Functions" name="Functions">Functions</h3>
+<p>Calling a function or a method of an object:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CallFunction" title="en/JS_CallFunction">JS_CallFunction</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CallFunctionName" title="en/JS_CallFunctionName">JS_CallFunctionName</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CallFunctionValue" title="en/JS_CallFunctionValue">JS_CallFunctionValue</a></li>
+</ul>
+<p>Function accessors:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ObjectIsFunction" title="en/JS_ObjectIsFunction">JS_ObjectIsFunction</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetFunctionArity" title="en/JS_GetFunctionArity">JS_GetFunctionArity</a></li>
+ <li><a href="/en/JS_GetFunctionFlags" title="en/JS_GetFunctionFlags">JS_GetFunctionFlags</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetFunctionId" title="en/JS_GetFunctionId">JS_GetFunctionId</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetFunctionName" title="en/JS_GetFunctionName">JS_GetFunctionName</a> {{ Deprecated_inline() }}</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetFunctionObject" title="en/JS_GetFunctionObject">JS_GetFunctionObject</a></li>
+</ul>
+<p>Creating functions:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CloneFunctionObject" title="en/JS_CloneFunctionObject">JS_CloneFunctionObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DefineFunction" title="en/JS_DefineFunction">JS_DefineFunction</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_DefineFunction" title="en/JS_DefineFunction">JS_DefineUCFunction</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_DefineFunctions" title="en/JS_DefineFunctions">JS_DefineFunctions</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_NewFunction" title="en/JS_NewFunction">JS_NewFunction</a></li>
+</ul>
+<h3 id="RegExps" name="RegExps">RegExps</h3>
+<ul>
+ <li><a href="/En/SpiderMonkey/JSAPI_Reference/JS_NewRegExpObject" title="En/SpiderMonkey/JSAPI_Reference/JS_NewRegExpObject">JS_NewRegExpObject</a></li>
+ <li><a href="/En/SpiderMonkey/JSAPI_Reference/JS_NewRegExpObject" title="En/SpiderMonkey/JSAPI_Reference/JS_NewRegExpObject">JS_NewUCRegExpObject</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetRegExpInput" title="en/SpiderMonkey/JSAPI_Reference/JS_SetRegExpInput">JS_SetRegExpInput</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ClearRegExpRoots" title="en/SpiderMonkey/JSAPI_Reference/JS_ClearRegExpRoots">JS_ClearRegExpRoots</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ClearRegExpStatics" title="en/SpiderMonkey/JSAPI_Reference/JS_ClearRegExpStatics">JS_ClearRegExpStatics</a></li>
+</ul>
+<h3 id="Security" name="Security">Security</h3>
+<ul>
+ <li>struct <a href="/en/SpiderMonkey/JSAPI_Reference/JSPrincipals" title="en/JSPrincipals">JSPrincipals</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSPRINCIPALS_HOLD" title="en/JSPRINCIPALS_HOLD">JSPRINCIPALS_HOLD</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JSPRINCIPALS_HOLD" title="en/JSPRINCIPALS_HOLD">JSPRINCIPALS_DROP</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetObjectPrincipalsFinder" title="en/JS_SetObjectPrincipalsFinder">JS_SetObjectPrincipalsFinder</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetPrincipalsTranscoder" title="en/JS_SetPrincipalsTranscoder">JS_SetPrincipalsTranscoder</a></li>
+</ul>
+<ul>
+ <li>enum <a href="/en/SpiderMonkey/JSAPI_Reference/JS_CheckAccess" title="en/JS_CheckAccess">JSAccessMode</a> – <a href="/en/SpiderMonkey/JSAPI_Reference/JS_CheckAccess" title="en/JS_CheckAccess">JSACC_PROTO</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_CheckAccess" title="en/JS_CheckAccess">JSACC_PARENT</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_CheckAccess" title="en/JS_CheckAccess">JSACC_IMPORT</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_CheckAccess" title="en/JS_CheckAccess">JSACC_WATCH</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_CheckAccess" title="en/JS_CheckAccess">JSACC_READ</a>, <a href="/en/SpiderMonkey/JSAPI_Reference/JS_CheckAccess" title="en/JS_CheckAccess">JSACC_WRITE</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_CheckAccess" title="en/JS_CheckAccess">JS_CheckAccess</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSObjectOps.checkAccess" title="en/JSObjectOps.checkAccess">JSObjectOps.checkAccess</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSClass.checkAccess" title="en/JSClass.checkAccess">JSClass.checkAccess</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetCheckObjectAccessCallback" title="en/JS_SetCheckObjectAccessCallback">JS_SetCheckObjectAccessCallback</a></li>
+</ul>
+<h3 id="Threading" name="Threading">Threading</h3>
+<p>The following functions support the SpiderMonkey threading model. They are only available in <code><a href="/en/SpiderMonkey/JSAPI_Reference/JS_THREADSAFE" title="en/JS_THREADSAFE">JS_THREADSAFE</a></code> builds.</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_BeginRequest" title="en/JS_BeginRequest">JS_BeginRequest</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_BeginRequest" title="en/JS_BeginRequest">JS_EndRequest</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_YieldRequest" title="en/JS_YieldRequest">JS_YieldRequest</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SuspendRequest" title="en/JS_SuspendRequest">JS_SuspendRequest</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SuspendRequest" title="en/JS_SuspendRequest">JS_ResumeRequest</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_GetContextThread" title="en/JS_GetContextThread">JS_GetContextThread</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ClearContextThread" title="en/JS_ClearContextThread">JS_SetContextThread</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ClearContextThread" title="en/JS_ClearContextThread">JS_ClearContextThread</a></li>
+</ul>
+<p>The following functions exist in all builds, but in non-<code><a href="/en/SpiderMonkey/JSAPI_Reference/JS_THREADSAFE" title="en/JS_THREADSAFE">JS_THREADSAFE</a></code> builds, they do nothing:</p>
+<ul>
+ <li><a href="/en/JS_LockRuntime" title="en/JS_LockRuntime">JS_LockRuntime</a></li>
+ <li><a href="/en/JS_UnlockRuntime" title="en/JS_UnlockRuntime">JS_UnlockRuntime</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_Lock" title="en/JS_Lock">JS_Lock</a> {{ Deprecated_inline() }}</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_Unlock" title="en/JS_Unlock">JS_Unlock</a> {{ Deprecated_inline() }}</li>
+</ul>
+<h3 id="Time" name="Time">Time</h3>
+<ul>
+ <li><a href="/en/JS_Now" title="en/JS_Now">JS_Now</a></li>
+</ul>
+<h3 id="Callback_Types" name="Callback_Types">Callback Types</h3>
+<p>Native function types:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSNative" title="en/JSNative">JSNative</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSFastNative" title="en/JSFastNative">JSFastNative</a></li>
+</ul>
+<p>Other callback types:</p>
+<ul>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_AddExternalStringFinalizer" title="en/JS_AddExternalStringFinalizer">JSStringFinalizeOp</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_AddExternalStringFinalizer" title="en/JS_AddExternalStringFinalizer">JS_AddExternalStringFinalizer</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_TRACER_INIT" title="en/JS_TRACER_INIT">JSTraceCallback</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_TRACER_INIT" title="en/JS_TRACER_INIT">JS_TRACER_INIT</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SET_TRACING_DETAILS" title="en/JS_SET_TRACING_DETAILS">JSTraceNamePrinter</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SET_TRACING_DETAILS" title="en/JS_SET_TRACING_DETAILS">JS_SET_TRACING_DETAILS</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetContextCallback" title="en/JS_SetContextCallback">JSContextCallback</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetContextCallback" title="en/JS_SetContextCallback">JS_SetContextCallback</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCCallback" title="en/JS_SetGCCallback">JSGCCallback</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetGCCallback" title="en/JS_SetGCCallback">JS_SetGCCallback</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetExtraGCRoots" title="en/JS_SetExtraGCRoots">JSTraceDataOp</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetExtraGCRoots" title="en/JS_SetExtraGCRoots">JS_SetExtraGCRoots</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetBranchCallback" title="en/JS_SetBranchCallback">JSBranchCallback</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetBranchCallback" title="en/JS_SetBranchCallback">JS_SetBranchCallback</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetErrorReporter" title="en/JS_SetErrorReporter">JSErrorReporter</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetErrorReporter" title="en/JS_SetErrorReporter">JS_SetErrorReporter</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_ReportErrorNumber" title="en/JS_ReportErrorNumber">JSErrorCallback</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_ReportErrorNumber" title="en/JS_ReportErrorNumber">JS_ReportErrorNumber</a> and friends</li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_AddArgumentFormatter" title="en/JS_AddArgumentFormatter">JSArgumentFormatter</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_AddArgumentFormatter" title="en/JS_AddArgumentFormatter">JS_AddArgumentFormatter</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetPrincipalsTranscoder" title="en/JS_SetPrincipalsTranscoder">JSPrincipalsTranscoder</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetPrincipalsTranscoder" title="en/JS_SetPrincipalsTranscoder">JS_SetPrincipalsTranscoder</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetObjectPrincipalsFinder" title="en/JS_SetObjectPrincipalsFinder">JSObjectPrincipalsFinder</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_SetObjectPrincipalsFinder" title="en/JS_SetObjectPrincipalsFinder">JS_SetObjectPrincipalsFinder</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_MapGCRoots" title="en/JS_MapGCRoots">JSGCRootMapFun</a> - used by <a href="/en/SpiderMonkey/JSAPI_Reference/JS_MapGCRoots" title="en/JS_MapGCRoots">JS_MapGCRoots</a></li>
+</ul>
+<p>See also <a href="#Classes">Classes</a>, above.</p>
+<h3 id="Macros" name="Macros">Macros</h3>
+<ul>
+ <li><a href="/en/JS_DEFAULT_XML_NAMESPACE_ID" title="en/JS_DEFAULT_XML_NAMESPACE_ID">JS_DEFAULT_XML_NAMESPACE_ID</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSFUN_BOUND_METHOD" title="en/JSFUN_BOUND_METHOD">JSFUN_BOUND_METHOD</a> {{ Deprecated_inline() }}</li>
+ <li><a href="/en/JSFUN_GETTER" title="en/JSFUN_GETTER">JSFUN_GETTER</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JSFUN_GLOBAL_PARENT" title="en/JSFUN_GLOBAL_PARENT">JSFUN_GLOBAL_PARENT</a> {{ Deprecated_inline() }}</li>
+ <li><a href="/en/JSFUN_HEAVYWEIGHT" title="en/JSFUN_HEAVYWEIGHT">JSFUN_HEAVYWEIGHT</a></li>
+ <li><a href="/en/JSFUN_LAMBDA" title="en/JSFUN_LAMBDA">JSFUN_LAMBDA</a></li>
+ <li><a href="/en/JSFUN_SETTER" title="en/JSFUN_SETTER">JSFUN_SETTER</a></li>
+ <li><a href="/en/JSREG_GLOB" title="en/JSREG_GLOB">JSREG_GLOB</a></li>
+ <li><a href="/en/JSREG_FOLD" title="en/JSREG_FOLD">JSREG_FOLD</a></li>
+ <li><a href="/en/JSREG_MULTILINE" title="en/JSREG_MULTILINE">JSREG_MULTILINE</a></li>
+</ul>
+<h3 id="Preprocessor_conditionals" name="Preprocessor_conditionals">Preprocessor conditionals</h3>
+<ul>
+ <li><a href="/en/BUILD_OPT" title="en/BUILD_OPT">BUILD_OPT</a></li>
+ <li><a href="/en/GC_MARK_DEBUG" title="en/GC_MARK_DEBUG">GC_MARK_DEBUG</a></li>
+ <li><a href="/en/SpiderMonkey/JSAPI_Reference/JS_THREADSAFE" title="en/JS_THREADSAFE">JS_THREADSAFE</a></li>
+</ul>
+<p>These defines are useful for tuning SpiderMonkey performance:</p>
+<ul>
+ <li><a href="/en/JS_ARENAMETER" title="en/JS_ARENAMETER">JS_ARENAMETER</a> - Arena package instrumentation.</li>
+ <li><a href="/en/JS_GCMETER" title="en/JS_GCMETER">JS_GCMETER</a> - GC instrumentation.</li>
+ <li><a href="/en/JS_HASHMETER" title="en/JS_HASHMETER">JS_HASHMETER</a> - Hash table package instrumentation.</li>
+</ul>
+<h3 id="C.2B.2B_features" name="C.2B.2B_features">C++ features</h3>
+<ul>
+ <li>class <a href="/en/JSAutoRequest" title="en/JSAutoRequest">JSAutoRequest</a></li>
+ <li>class <a href="/en/JSAutoLocalRootScope" title="en/JSAutoLocalRootScope">JSAutoLocalRootScope</a></li>
+</ul>
+<p>{{ languages( { "ja": "ja/JSAPI_Reference", "pl": "pl/Dokumentacja_JSAPI" } ) }}</p>
+<h1 id="JSAPI_参考">JSAPI 参考</h1>
+<p> </p>
+<h3 id=".E6.95.B0.E6.8D.AE.E7.BB.93.E6.9E.84" name=".E6.95.B0.E6.8D.AE.E7.BB.93.E6.9E.84">数据结构</h3>
+<ul>
+ <li><a href="/cn/JSClass" title="cn/JSClass">JS类</a></li>
+ <li><a href="/cn/JSConstDoubleSpec" title="cn/JSConstDoubleSpec">JSConstDoubleSpec</a></li>
+ <li><a href="/cn/JSErrorReport" title="cn/JSErrorReport">JS错误报告</a></li>
+ <li><a href="/cn/JSFunctionSpec" title="cn/JSFunctionSpec">JS函数规范</a></li>
+ <li><a href="/cn/JSIdArray" title="cn/JSIdArray">JSIdArray</a></li>
+ <li><a href="/cn/JSObjectOps" title="cn/JSObjectOps">JS对象操作</a></li>
+ <li><a href="/cn/JSPrincipals" title="cn/JSPrincipals">JSPrincipals</a></li>
+ <li><a href="/cn/JSProperty" title="cn/JSProperty">JS属性</a></li>
+ <li><a href="/cn/JSPropertySpec" title="cn/JSPropertySpec">JS属性规范</a></li>
+</ul>