Found 548 pages:
| # | Page | Tags and summary | 
|---|---|---|
| 1 | SpiderMonkey | SpiderMonkey | 
| Standalone source code releases can be found on the Releases page. | ||
| 2 | Creating JavaScript tests | Automated testing, Build documentation, Guide, QA, SpiderMonkey | 
| Most new tests could go in either suite. The main differences are: | ||
| 3 | FOSS | Guide, SpiderMonkey | 
| Feel free to add your own SpiderMonkey-based open source projects (and if necessary add categories)! | ||
| 4 | Future directions | Guide, Mozilla, SpiderMonkey | 
| This article documents future directions in functionality, design, and coding practices for SpiderMonkey. It can be read as something like an "ideal future state" for the engine. That means the code as it is today won't match this document, and that's OK. Whenever practical, new code and changes should move code closer to the ideal future. And of course, the idea of the future is always evolving in time as things change and we learn more. | ||
| 5 | GC Rooting Guide | SpiderMonkey | 
| No summary! | ||
| 6 | Getting SpiderMonkey source code | Guide, SpiderMonkey | 
| You can get the SpiderMonkey source code in gzipped form or directly from the Mercurial repository. | ||
| 7 | Hacking Tips | SpiderMonkey | 
| This page list a few tips to help you investigate issues related to SpiderMonkey. All tips listed here are dealing with the JavaScript shell obtained at the end of the build documentation of SpiderMonkey. It is separated in 2 parts, one section related to debugging and another section related to drafting optimizations. Many of these tips only apply to debug builds of the JS shell; they will not function in a release build. | ||
| 8 | How to embed the JavaScript engine | Embedding Mozilla, JavaScript, SpiderMonkey, Tutorial | 
| See also JSAPI User Guide. In particular, it has more and better code examples! | ||
| 9 | Index | Index, MDN Meta, SpiderMonkey | 
| Found 548 pages: | ||
| 10 | Introduction to the JavaScript shell | SpiderMonkey | 
| To get the SpiderMonkey JavaScript shell, see the SpiderMonkey Build Documentation or download a compiled binary for your platform from the Nightly Builds. | ||
| 11 | JIT Optimization Outcomes | |
| SpiderMonkey's optimizing JIT, IonMonkey, uses different optimization strategies to speed up various operations. The most typical operations that are relevant for fast program execution are property accesses and function calls. | ||
| 12 | JIT Optimization Strategies | SpiderMonkey | 
| SpiderMonkey's optimizing JIT, IonMonkey, uses various strategies to optimize operations. The most commonplace operations that are relevant for fast program execution are property accesses and function calls. | ||
| 13 | JSAPI Cookbook | SpiderMonkey | 
| This article shows the JSAPI equivalent for a tiny handful of common JavaScript idioms. | ||
| 14 | JSAPI User Guide | JSAPI, SpiderMonkey | 
| This document explains how to embed SpiderMonkey, the Mozilla JavaScript engine, in your C++ program. | ||
| 15 | JSAPI reference | NeedsContent, SpiderMonkey | 
| JS::DeflateStringToUTF8Buffer | ||
| 16 | BOOLEAN_TO_JSVAL | JSAPI Reference, Obsolete, SpiderMonkey | 
| BOOLEAN_TO_JSVALconverts aboolargument,b, to a booleanjsval. | ||
| 17 | DOUBLE_TO_JSVAL | JSAPI Reference, Obsolete, SpiderMonkey | 
| DOUBLE_TO_JSVALis the inverse ofJS::ToNumber. | ||
| 18 | INT_FITS_IN_JSVAL | JSAPI Reference, Obsolete, SpiderMonkey | 
| Determines if a specified C integer value, i, lies within the range allowed for integerjsvals. If so,INT_FITS_IN_JSVALreturnsTRUE, andican be cast tojsvalby calling. Otherwise,INT_FITS_IN_JSVALreturnsFALSE. In this case, the application can still convertito ajsvalusingJS_NewNumberValue. | ||
| 19 | INT_TO_JSVAL | JSAPI Reference, Obsolete, SpiderMonkey | 
| INT_TO_JSVALconverts a C integer,i, to ajsval. | ||
| 20 | JS::Add*Root | JSAPI Reference, NeedsContent, Obsolete, Reference, Référence, SpiderMonkey | 
| These functions are obsoleted, use JS::PersistentRootedinstead. | ||
| 21 | JS::AutoIdArray | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::AutoIdArraytakes the ownership ofJSIdArray, and frees it in destructor by callingJS_DestroyIdArray. | ||
| 22 | JS::AutoSaveExceptionState | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::AutoSaveExceptionStatesaves and later restores the current exception state of a givenJSContext. | ||
| 23 | JS::AutoValueArray | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::AutoValueArray<N>holds a rooted array ofJS::Value. This is typically used for local variables being passed to function which requiresJS::HandleValueArrayor a pointer toJS::Valuearray. | ||
| 24 | JS::AutoVectorRooter | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::AutoVectorRooter<T>holds a variable-size rooted array of typeT. | ||
| 25 | JS::BooleanValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 26 | JS::Call | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::Callcalls a specified function,fun, on an object,thisObj. In terms of function execution, the object is treated asthis. | ||
| 27 | JS::CallArgs | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::CallArgsis helper class encapsulating access to the callee,thisvalue, arguments, and argument count for a function call. | ||
| 28 | JS::CloneFunctionObject | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::CloneFunctionObjectcreates a new function object fromfunobj. The new object has the same code and argument list asfunobj. IfscopeChainis supplied, it usesscopeChainas its enclosing scope. IfscopeChainis omitted, it creates a new function object incx's global. This can be helpful iffunobjis an extant function that you wish to use as if it were enclosed by a newly-created global object. | ||
| 29 | JS::Compile | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::Compilecompiles a script,srcBuf,chars,bytes, orfile, for execution. | ||
| 30 | JS::CompileFunction | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::CompileFunctioncompiles a function from a text stringchars,bytes, orsrcBuf. | ||
| 31 | JS::CompileOffThread | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::CompileOffThreadcompiles a script,charsfor execution. | ||
| 32 | JS::CompileOptions | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Some methods of JS::OwningCompileOptionsandJS::CompileOptionsreturn the instance itself to allow method chain. | ||
| 33 | JS::Construct | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::Constructcalls a specified function as a constructor,fun. | ||
| 34 | JS::CreateError | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::CreateErrorcreates anErrorobject with specified properties. | ||
| 35 | JS::CurrentGlobalOrNull | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::CurrentGlobalOrNull()returns the global object for whatever function is currently running on the context. In other words, it returns the global object on the current scope chain. | ||
| 36 | JS::DeflateStringToUTF8Buffer | JSAPI Reference, Refere, SpiderMonkey | 
| JS::DeflateStringToUTF8Bufferencodessrcas UTF8. The caller must either ensuredsthas enough space to encode the entire string, or pass the length of the buffer asdstlenp. In which case, the function will encode characters from the string until the buffer is exhausted. Does not write thenullterminator. | ||
| 37 | JS::DoubleNaNValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 38 | JS::DoubleValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 39 | JS::Evaluate | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::Evaluatecompiles and executes a script in the specified scope,objorscopeChain. | ||
| 40 | JS::FalseValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 41 | JS::Float32Value | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 42 | JS::GetDeflatedUTF8StringLength | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::GetDeflatedUTF8StringLengthreturns the length of the char buffer required to encodesas UTF8. The returned length does not include the null-terminator. | ||
| 43 | JS::GetFirstArgumentAsTypeHint | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 44 | JS::GetSelfHostedFunction | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::GetSelfHostedFunctioncreates a new JavaScript function implemented in self-hosted JavaScript. | ||
| 45 | JS::Handle | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Here, ptrrepresents the private member ofJS::Handle<T>, typed withT. | ||
| 46 | JS::HandleValueArray | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::HandleValueArrayis a handle to an array of rooted values. This is useful as a parameter type, or a temporal local variable for it. | ||
| 47 | JS::IdentifyStandardInstance | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 48 | JS::Int32Value | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 49 | JS::IsCallable | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::IsCallablereturns whether the given function object is callable. | ||
| 50 | JS::MutableHandle | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Here, ptrrepresents the private member ofJS::MutableHandle<T>, typed withT *. | ||
| 51 | JS::NewFunctionFromSpec | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 52 | JS::NullHandleValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::NullHandleValueis aJS::HandleValueconstant that represents the JavaScript valuenull. | ||
| 53 | JS::NullValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 54 | JS::NumberValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 55 | JS::ObjectOrNullValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 56 | JS::ObjectValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 57 | JS::OrdinaryToPrimitive | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::OrdinaryToPrimitiveconverts a JavaScript object to a specified type value, by the algorithm specified in ES6 draft rev 28 (2014 Oct 14) 7.1.1, second algorithm. | ||
| 58 | JS::PersistentRooted | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Here, ptrrepresents the private member ofJS::PersistentRooted<T>, typed withT. | ||
| 59 | JS::PropertySpecNameEqualsId | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::PropertySpecNameEqualsIddetermines if the givenJSPropertySpec::nameorJSFunctionSpec::namevalue equals the givenjsid, and returnstrueif so. | ||
| 60 | JS::PropertySpecNameIsSymbol | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::PropertySpecNameIsSymboldetermines if the givenJSPropertySpec::nameorJSFunctionSpec::namevalue is actually a symbol code and not a string, and returnstrueif so. | ||
| 61 | JS::PropertySpecNameToPermanentId | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::PropertySpecNameToPermanentIdcreates ajsidthat does not need to be marked for GC fromJSPropertySpec::nameorJSFunctionSpec::name. The resultingjsid, on success, is either an interned string or a well-known symbol; either way it is immune to GC so there is no need to visit*idpduring GC marking.. | ||
| 62 | JS::ProtoKeyToId | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::ProtoKeyToIdconverts a specified JS prototype keykey, to a JS ID.JSstores ajsidto*idp. | ||
| 63 | JS::Remove*Root | JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| JS::Remove*Rootremoves the variable thatrppoints to from the garbage collector's root set. | ||
| 64 | JS::Rooted | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Here, ptrrepresents the private member ofJS::Rooted<T>, typed withT. | ||
| 65 | JS::SetLargeAllocationFailureCallback | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| If a large allocation fails when calling pod_{calloc,realloc}CanGC, the JS engine may call thelarge-allocation-failure callback, if set, to allow the embedding to flush caches, possibly perform shrinking GCs, etc. to make some room. The allocation will then be retried (and may still fail.) | ||
| 66 | JS::SetOutOfMemoryCallback | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Unlike the error reporter, which is only called if the exception for an OOM bubbles up and is not caught, the JS::OutOfMemoryCallbackis called immediately at the OOM site to allow the embedding to capture the current state of heap allocation before anything is freed. If the large-allocation-failure callback is called at all (not all allocation sites call the large-allocation-failure callback on failure), it is called before the out-of-memory callback; the out-of-memory callback is only called if the allocation still fails after the large-allocation-failure callback has returned. | ||
| 67 | JS::SourceBufferHolder | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::SourceBufferHolderis the container class for passing in script source buffers to the JS engine. This not only groups the buffer and length values, it also provides a way to optionally pass ownership of the buffer to the JS engine without copying. Rules for use: | ||
| 68 | JS::StringValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 69 | JS::SymbolValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 70 | JS::ToBoolean | JSAPI Reference, SpiderMonkey | 
| JS::ToBooleanconverts a JavaScript value to a boolean. It implements the ToBoolean operation described in ECMA 262-3 §9.2. This function can not fail and the return value is always the boolean conversion of the argument. | ||
| 71 | JS::ToInt32 | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::ToInt32converts a JavaScript value to a signed 32bit integer. It implements the ToInt32 operator described in ECMA 262-3 §9.5. | ||
| 72 | JS::ToInt64 | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::ToInt64converts a JavaScript value to a signed 64bit integer. | ||
| 73 | JS::ToNumber | JSAPI Reference, SpiderMonkey | 
| JS::ToNumberconverts a JavaScript value to a number. It implements the ToNumber operator described in ECMA 262-3 §9.3. | ||
| 74 | JS::ToPrimitive | JSAPI Reference, SpiderMonkey | 
| JS::ToPrimitiveconverts a JavaScript object,obj, to a primitive value using ECMAScript 6ToPrimitive. | ||
| 75 | JS::ToString | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::ToStringreturns a string representation of a JavaScript value. | ||
| 76 | JS::ToUint16 | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::ToInt16converts a JavaScript value to an unsigned 16bit integer. It implements the ToInt16 operator described in ECMA 262-3 §9.7. | ||
| 77 | JS::ToUint32 | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::ToInt32converts a JavaScript value to an unsigned 32bit integer. It implements the ToInt32 operator described in ECMA 262-3 §9.6. | ||
| 78 | JS::ToUint64 | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::ToInt64converts a JavaScript value to an unsigned 64bit integer. | ||
| 79 | JS::TrueHandleValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::TrueHandleValueandJS::FalseHandleValueareJS::HandleValueconstants that represent the JavaScript valuestrueandfalse. | ||
| 80 | JS::TrueValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 81 | JS::UndefinedHandleValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::UndefinedHandleValueis aJS::HandleValueconstant that represents the JavaScript valueundefined. | ||
| 82 | JS::UndefinedValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Editorial review completed. | ||
| 83 | JS::Value | JSAPI Reference, SpiderMonkey | 
| A C++ variable of type JS::Valuerepresents a value in JavaScript: a string, number, object (including arrays and functions), boolean, symbol,null, orundefined. | ||
| 84 | JSAutoByteString | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSAutoByteStringtakes the ownership of string and frees it in destructor. | ||
| 85 | JSAutoCompartment | JSAPI Reference, SpiderMonkey | 
| No summary! | ||
| 86 | JSBool | JSAPI Reference, Obsolete, SpiderMonkey | 
| No summary! | ||
| 87 | JSCheckAccessOp | JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| Check whether obj[id]may be accessed permode, returningJS_FALSEon error/exception,JS_TRUEon success withobj[id]'s stored value in*vp. As forJSPropertyOp,idis either a string or an intjsval. | ||
| 88 | JSClass | JSAPI Reference, SpiderMonkey | 
| Use JSClassto define a custom class of JavaScript objects. AJSClasshas a name, flags, and several callback functions for advanced customization of object behavior. | ||
| 89 | JSClass.call | JSAPI Reference, SpiderMonkey | 
| Note that when a custom object is called, a thisargument is calculated for it just as if it were a function. That is, theobjargument received by the JSNative is thethisargument, not the custom object that was called! | ||
| 90 | JSClass.flags | JSAPI Reference, SpiderMonkey | 
| The flagsfield is of typeuint32_t. Its value is the logical OR of zero or more of the following constants: | ||
| 91 | JSConstDoubleSpec | JSAPI Reference, SpiderMonkey | 
| JSConstDoubleSpecsis used to define a set of double values that are assigned as properties to an object usingJS_DefineConstDoubles. | ||
| 92 | JSConvertOp | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSConvertOpcallback specifies conversion behavior for objects having this class, implementing the ECMAScript[[DefaultValue]]behavior for them. On success it must return a primitive value in*vp. | ||
| 93 | JSDeletePropertyOp | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSDeletePropertyOpcallback is a hook that applications may install to be called at some point during property access. AJSDeletePropertyOpmay be installed on aJSClassto hook property deletes. | ||
| 94 | JSEnumerateOp | JSAPI Reference, SpiderMonkey | 
| JSEnumerateOpis called just before an object is enumerated (via afor...instatement, an array comprehension, or a call toJS_Enumerate). It should define any remaining lazy properties that should be enumerable but are not yet defined inobj. This hook does not implement iteration: once the properties are defined, the JavaScript engine can enumerate them. | ||
| 95 | JSErrorFormatString | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSErrorFormatStringis a struct to represent error message and type, returned byJS_ReportErrorNumberfunction. | ||
| 96 | JSErrorReport | JSAPI Reference, SpiderMonkey | 
| JSErrorReportdescribes a single error that occurs in the execution of script. | ||
| 97 | JSExceptionState | JSAPI Reference, SpiderMonkey | 
| A JSExceptionStateobject is returned by theJS_SaveExceptionStatefunction, and is passed to functionsJS_RestoreExceptionStateandJS_DropExceptionState. | ||
| 98 | JSExnType | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| These types are part of a JSErrorFormatStringstructure. They define which error to throw in case of a runtime error.JSEXN_NONEmarks an unthrowable error. | ||
| 99 | JSExtendedClass | JSAPI Reference, Obsolete, SpiderMonkey | 
| To implement a custom class that uses any of the JSExtendedClasscallbacks: | ||
| 100 | JSExtendedClass.outerObject | JSAPI Reference, Obsolete, SpiderMonkey | 
| See split objects. | ||
| 101 | JSExtendedClass.wrappedObject | JSAPI Reference, Obsolete, SpiderMonkey | 
| If a class has the JSCLASS_IS_EXTENDEDbit set in itsJSClass.flagsand has a non-null, then objects of that class may be wrappers. In a few cases the JavaScript engine will pretend the wrapper isn't there, instead operating on the object it wraps. In these cases the engine calls theJSExtendedClass.wrappedObjectcallback to get the wrapped object. Most classes do not implementwrappedObject. | ||
| 102 | JSFUN_BOUND_METHOD | JSAPI Reference, Obsolete, SpiderMonkey | 
| This macro exists only for backward compatibility with existing applications. Its use is deprecated. Future versions of the JavaScript engine may not support or recognize this macro. | ||
| 103 | JSFUN_GLOBAL_PARENT | JSAPI Reference, Obsolete, SpiderMonkey | 
| No summary! | ||
| 104 | JSFastNative | JSAPI Reference, Obsolete, SpiderMonkey | 
| No summary! | ||
| 105 | JSFinalizeOp | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| The JSFinalizeOpis analogous to Java finalizers or C++ destructors. The garbage collector calls this callback for each object it collects. The finalizer's job is to clean up any resources allocated by the instance which wouldn't normally be cleaned up by the garbage collector (private data stored in the object by the application, file handles, etc.) | ||
| 106 | JSFreeOp | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Various finalization API takes not JSContext *but rather eitherJSFreeOpstructure or its library-private counterpartFreeOp. These structures wrap parameters that are passed to the finalizers removing most of explicit dependencies onJSContextin the finalization code. | ||
| 107 | JSFunction | API, Guide, JSAPI, NeedsContent, SpiderMonkey | 
| JSFunctionis a type in the JSAPI. The APIsJS_NewFunction,JS_DefineFunction,JS_CompileFunction, and their Unicode equivalents return values of typeJSFunction *. | ||
| 108 | JSFunctionSpec | JSAPI Reference, SpiderMonkey | 
| JSFunctionSpecdefines the attributes for a single JS function to associate with an object. An application typically has an array ofJSFunctionSpecto define all the functions for an object and callsJS_DefineFunctionsorJS_InitClassto create the functions and assign them to an object. | ||
| 109 | JSGetObjectOps | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSObjectOpsis used byJS_NewObject's internals to discover the set of high-level object operations to use for new objects of the given class. All native objects have aJSClass, which is stored as a private (int-tagged) pointer in object slots. In contrast, all native and host objects have aJSObjectMapatobj->map, which may be shared among a number of objects, and which contains theJSObjectOps *opspointer used to dispatch object operations from API calls. | ||
| 110 | JSHasInstanceOp | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSHasInstanceOpis called to check whethervis an instance ofobj. Returnfalseon error or exception,trueon success withtruein*bpifvis an instance ofobj,falsein*bpotherwise. | ||
| 111 | JSID_EMPTY | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSID_EMPTYis an internaljsidvalue which is used in type inference code. | ||
| 112 | JSID_IS_EMPTY | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSID_IS_EMPTYtests whether a specified JS ID,id, isJSID_EMPTY. | ||
| 113 | JSID_IS_GCTHING | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSID_IS_GCTHINGtests whether a specified JS ID,id, is a GC thing, and returnstrueif it's a GC thing. | ||
| 114 | JSID_IS_INT | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSID_IS_INTtests whether a specified JS ID,id, is an integer, and returnstrueif it's an integer. | ||
| 115 | JSID_IS_STRING | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSID_IS_STRINGtests whether a specified JS ID,id, is a string, and returnstrueif it's a string. | ||
| 116 | JSID_IS_SYMBOL | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSID_IS_SYMBOLtests whether a specified JS ID,id, is a JS Symbol, and returnstrueif it's a JS Symbol. | ||
| 117 | JSID_IS_VOID | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSID_IS_VOIDtests whether a specified JS ID,id, isJSID_VOID. | ||
| 118 | JSID_IS_ZERO | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSID_IS_ZEROtests whether a specified JS ID,id, is zero (0in its integer representation). | ||
| 119 | JSID_VOID | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSID_VOIDdoes not occur in JS scripts but may be used to indicate the absence of a validjsid. A voidjsidis not a valid id and only arises as an exceptional API return value, such as inJS_NextProperty. Embeddings must not passJSID_VOIDinto JSAPI entry points expecting a jsid and do not need to handleJSID_VOIDin hooks receiving a jsid except when explicitly noted in the API contract. | ||
| 120 | JSIdArray | JSAPI Reference, SpiderMonkey | 
| JSIdArrayis used to hold IDs for enumerated properties associated with an object. | ||
| 121 | JSIteratorOp | JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| The JavaScript engine calls the callback to create an iterator object for a given object. The callback should return an iterator object orNULLif an error or exception occurred oncx. | ||
| 122 | JSMarkOp | JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| Call JS_MarkGCThingfor each GC thing directly reachable fromobj. UseJSVAL_IS_GCTHINGto check whether a value needs to be marked andJSVAL_TO_GCTHINGto convert thejsvalto a pointer. | ||
| 123 | JSNative | JSAPI Reference, SpiderMonkey | 
| JSNativeis the type of native implementations of JavaScript functions.  Full documentation of how to define aJSNative(or aJSFastNative, the equivalenttypedefwhich preceded it) is available in the API header"js/CallArgs.h"Added in SpiderMonkey 24.  This header is new, but the semantics it describes are applicable to all recent SpiderMonkey releases.  The preferred way to implement a function is to use theJS::CallArgsstructure defined there; the macros providing equivalent functionality are deprecated. | ||
| 124 | JSNewEnumerateOp | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| From SpiderMonkey 38, JSNewEnumerateOpis the type ofObjectOps::enumerate. This callback overrides a portion of SpiderMonkey's default[[Enumerate]]internal method. When an ordinary object is enumerated, that object and each object on its prototype chain is tested for an enumerate op, and those ops are called in order. The properties each op adds to thepropertiesvector are added to the set of values thefor-inloop will iterate over. All of this is nonstandard. | ||
| 125 | JSNewResolveOp | JSAPI Reference, Obsolete, SpiderMonkey | 
| Like JSResolveOp, butflagsprovide contextual information about the property access. | ||
| 126 | JSObject | JSAPI Reference, SpiderMonkey | 
| Objects are made up of the following parts: | ||
| 127 | JSObjectOp | JSAPI Reference, Obsolete, SpiderMonkey | 
| The callbacks of this type are: | ||
| 128 | JSObjectOps.defaultValue | JSAPI Reference, Obsolete, SpiderMonkey | 
| The JSObjectOps.defaultValuecallback corresponds to the [[DefaultValue]] method defined in ECMA 262-3 §8.6.2.6. Many expressions in the ECMAScript language, such asa+b, involve implicit conversion of the operands using [[DefaultValue]]. | ||
| 129 | JSObjectOps.defineProperty | JSAPI Reference, Obsolete, SpiderMonkey | 
| Define obj[id], an own property ofobjnamedid, having the given initial value, with the specified getter, setter, and attributes. | ||
| 130 | JSObjectOps.destroyObjectMap | JSAPI Reference, Obsolete, SpiderMonkey | 
| No summary! | ||
| 131 | JSObjectOps.dropProperty | JSAPI Reference, Obsolete, SpiderMonkey | 
| The following contract governs JSObjectOpscallers and implementations: | ||
| 132 | JSObjectOps.enumerate | JSAPI Reference, Obsolete, SpiderMonkey | 
| For native objects, the enumeratecallback first checks theJSCLASS_NEW_ENUMERATEflag of the object's class. If the flag is present,enumeratesimply delegates the call toJSClass.enumerate. | ||
| 133 | JSObjectOps.getAttributes | JSAPI Reference, Obsolete, SpiderMonkey | 
| Get or set attributes of the property obj[id]. ReturnsJS_FALSEon error or exception, elseJS_TRUEwith current attributes in*attrsp. Ifpropis non-null, it must come from the*proppout parameter of a priorJSObjectOps.definePropertyorJSObjectOps.lookupPropertycall. | ||
| 134 | JSObjectOps.getProperty | JSAPI Reference, Obsolete, SpiderMonkey | 
| Get, set, or delete obj[id], returningJS_FALSEon error or exception,JS_TRUEon success. If getting or setting, the new value is returned in*vpon success. | ||
| 135 | JSObjectOps.getRequiredSlot | JSAPI Reference, Obsolete, SpiderMonkey | 
| Get and set a required slot, one that should already have been allocated. These operations are infallible, so required slots must be pre-allocated, or implementations must suppress out-of-memory errors. The native ops ( js_ObjectOps, seejs/src/jsobj.c) access slots reserved by including a call to theJSCLASS_HAS_RESERVED_SLOTS(n)macro in theJSClass.flagsinitializer. | ||
| 136 | JSObjectOps.lookupProperty | JSAPI Reference, Obsolete, SpiderMonkey | 
| Look for idinobjand its prototype chain, returningJS_FALSEon error or exception,JS_TRUEon success. On success, return null in*proppifidwas not found. Ifidwas found, return the first object searching fromobjalong its prototype chain in whichidnames a direct property in*objp, and return a non-null, opaque property pointer in*propp. | ||
| 137 | JSObjectOps.newObjectMap | JSAPI Reference, Obsolete, SpiderMonkey | 
| Create a new instance of (a concrete subclass of) JSObjectMap(see jsobj.h), with thenrefsandopsmembers initialized from the same-named parameters, and with thenslotsandfreeslotmembers initialized according toopsandclasp. Return null on error, non-null on success. | ||
| 138 | JSObjectOps.setProto | JSAPI Reference, Obsolete, SpiderMonkey | 
| These hooks must check for cycles without deadlocking, and otherwise take special steps. See js_SetPrototypeorjs_SetParentinjs/src/jsobj.cfor an example. | ||
| 139 | JSObjectPrincipalsFinder | JSAPI Reference, Obsolete, SpiderMonkey | 
| The JavaScript engine calls this callback to obtain principals for a JSPrincipals.subsumecheck. | ||
| 140 | JSPRINCIPALS_HOLD | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSPRINCIPALS_HOLDandJSPRINCIPALS_DROPare used to manage memory forJSPrincipalsobjects. | ||
| 141 | JSPrincipals | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSPrincipalsis the abstract base class of all principals objects, the objects that identify the source of a function or script and are used to determine its privileges. A principals object is like a JavaCodeSource. | ||
| 142 | JSPrincipalsTranscoder | |
| JSPrincipalsTranscoderis the type of a security callback that can be configured usingJS_SetPrincipalsTranscoderJSAPI 1.8 and earlier orJS_SetRuntimeSecurityCallbacksAdded in SpiderMonkey 1.8.1. | ||
| 143 | JSProperty | JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| JSPropertyis the abstract base class of all object properties. It is used internally inJSObjectOps.lookupProperty,getAttributes,setAttributes, anddropProperty. | ||
| 144 | JSPropertyDescriptor | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| The JSPropertyDescriptorholds the object that has the property, attributes of the property, getter and setter operations, and the value. | ||
| 145 | JSPropertyOp | JSAPI Reference, SpiderMonkey | 
| They are also the types of the ,getProperty, andsetPropertycallbacks, which are called during object property accesses. | ||
| 146 | JSPropertySpec | JSAPI Reference, SpiderMonkey | 
| JSPropertySpecdefines the attributes for a single JS property to associate with an object. Pass toJS_DefinePropertiesorJS_InitClassto create the properties and assign them to an object. | ||
| 147 | JSProtoKey | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Each of these types corresponds to standard objects in JavaScript. Some of them are Nightly only (depends on each option). | ||
| 148 | JSReserveSlotsOp | JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| JSClassoffers the following hook: | ||
| 149 | JSResolveOp | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSResolveOpcallback is a hook which is called when a property is not found on an object. | ||
| 150 | JSRuntime | JSAPI Reference, NeedsContent, NeedsUpdate, SpiderMonkey | 
| In the JSAPI, JSRuntimeis the top-level object that represents an instance of the JavaScript engine. A program typically has only oneJSRuntime, even if it has many threads. TheJSRuntimeis the universe in which JavaScript objects live; they can't travel to otherJSRuntimes. | ||
| 151 | JSSecurityCallbacks.contentSecurityPolicyAllows | |
| Editorial review completed. | ||
| 152 | JSString | JSAPI Reference, NeedsContent, SpiderMonkey | 
| Conceptually, a JavaScript string is just an array of char16_tcharacters and a length. You should not rely on the structure ofJSString, because it is subject to change; instead, treatJSStringobjects as opaque. | ||
| 153 | JSStringFinalizer | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSStringFinalizer::finalizefinalizes external strings created byJS_NewExternalString. | ||
| 154 | JSTraceOp | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JSTraceOpis the function type for trace operation of the class called to enumerate all traceable things reachable fromobj's private data structure. For each such thing, a trace implementation must call one of theJS_Call*Tracervariants on the thing. | ||
| 155 | JSType | JSAPI Reference, SpiderMonkey | 
| No summary! | ||
| 156 | JSVAL_IS_BOOLEAN | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_IS_BOOLEAN(v)is true if the given JavaScript value,v, is a boolean value (that is, it is eitherJSVAL_TRUEorJSVAL_FALSE). | ||
| 157 | JSVAL_IS_DOUBLE | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_IS_DOUBLE(v)is true ifvis a number represented in memory as ajsdouble. | ||
| 158 | JSVAL_IS_GCTHING | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_IS_GCTHING(v)is true if thejsvalvis eitherJSVAL_NULLor a reference to a value that is subject to garbage collection. JavaScript performs automatic garbage collection of objects, strings, and doubles. | ||
| 159 | JSVAL_IS_INT | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_IS_INT(v)is true if thejsvalvis a number represented in memory as an integer. | ||
| 160 | JSVAL_IS_NULL | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_IS_NULL(v)istrueifvisJSVAL_NULL, which is the JavaScriptnullvalue. | ||
| 161 | JSVAL_IS_NUMBER | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_IS_NUMBER(v)is true ifvis a JavaScript number. | ||
| 162 | JSVAL_IS_OBJECT | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_IS_OBJECT(v)returns true ifvis either an object orJSVAL_NULL. This indicates that it is safe to callto convertvto typeJSObject *. If v is a string, number, boolean, or undefined, the result is false. | ||
| 163 | JSVAL_IS_PRIMITIVE | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_IS_PRIMITIVE(v)is true ifvisundefined,null, a boolean, a number, or a string. Otherwise it is false, andvis an object. | ||
| 164 | JSVAL_IS_STRING | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_IS_STRING(v)is true ifvis a string. | ||
| 165 | JSVAL_IS_VOID | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_IS_VOID(v)is true ifvisJSVAL_VOID, which represents the JavaScript valueundefined. | ||
| 166 | JSVAL_LOCK | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_LOCKis a deprecated feature that is supported only for backward compatibility with existing applications. To lock a value, use local roots with JS_AddRoot. | ||
| 167 | JSVAL_NULL | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_NULLis ajsvalconstant that represents the JavaScript valuenull. It is equivalent to. | ||
| 168 | JSVAL_ONE | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_ONEis equivalent to. | ||
| 169 | JSVAL_TO_BOOLEAN | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_TO_BOOLEANcasts the valuevto a C integer, either 0 or 1. As a precondition,must be true. That is,vmust be eitherJSVAL_TRUEorJSVAL_FALSE. Otherwise the behavior is undefined. | ||
| 170 | JSVAL_TO_DOUBLE | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_TO_DOUBLEcasts a specified JS value,v, to a C floating-point number of typejsdouble. As a precondition,must be true. This function is not type-safe: ifvis an integer, string, null, or anything else, the behavior is undefined. | ||
| 171 | JSVAL_TO_GCTHING | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_TO_GCTHINGcasts ajsval,v, to a raw pointer. The type of the result isvoid *. | ||
| 172 | JSVAL_TO_INT | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_TO_INTconverts a specified integerjsval,v, to the corresponding C integer value. Ifvis any other type of value, the result is unspecified. | ||
| 173 | JSVAL_TO_OBJECT | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_TO_OBJECTcasts the argument,v, to typeJSObject *. As a precondition,must be true. That is,vmust be either a reference to an object orJSVAL_NULL. This function is not type-safe: ifvis not an object orJSVAL_NULL, the behavior is undefined. | ||
| 174 | JSVAL_TO_STRING | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_TO_STRINGcasts the argument,v, to typeJSString *. As a precondition,must be true. This function is not type-safe: ifvis not a string, the behavior is undefined. | ||
| 175 | JSVAL_TRUE | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_TRUEandJSVAL_FALSEarejsvalconstants that represent the JavaScript boolean values,trueandfalse. They are equivalent toandBOOLEAN_TO_JSVAL(false), respectively. | ||
| 176 | JSVAL_UNLOCK | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_UNLOCKis a deprecated feature that is supported only for backward compatibility with existing applications. To unlock a value, use local roots with JS_RemoveRoot. | ||
| 177 | JSVAL_VOID | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_VOIDis ajsvalconstant that represents the JavaScript valueundefined. | ||
| 178 | JSVAL_ZERO | JSAPI Reference, Obsolete, SpiderMonkey | 
| JSVAL_ZEROis equivalent to. | ||
| 179 | JSVersion | JSAPI Reference, SpiderMonkey | 
| The JSVersionenumerated type includes the following values. Each version has a name, which is a string used byJS_StringToVersionandJS_VersionToString. | ||
| 180 | JSXDRObjectOp | JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| Serialize or deserialize an object, given an XDR state record representing external data. See jsxdrapi.h. | ||
| 181 | JS_ASSERT_STRING_IS_FLAT | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_ASSERT_STRING_IS_FLATasserts the string is flattened, and returns a pointer toJSFlatString. | ||
| 182 | JS_Add*Root | JSAPI Reference, Obsolete, SpiderMonkey | 
| These functions are obsoleted, use JS::PersistentRootedinstead. | ||
| 183 | JS_AddArgumentFormatter | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_AddArgumentFormatterestablishesformatteras the conversion function for format strings beginning withformatin the contextcx. On success, it returnsJS_TRUE. Otherwise it returnsJS_FALSE. (At the moment,JS_AddArgumentFormatterfails only if there is no memory available to record the registration.) | ||
| 184 | JS_AddExternalStringFinalizer | JSAPI Reference, Obsolete, SpiderMonkey | 
| Add a finalizer for external strings created by JS_NewExternalStringusing a type-code returned from this function, and that understands how to free or release the memory pointed at by. | ||
| 185 | JS_AddFinalizeCallback | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_AddFinalizeCallbackadd a callback function which the garbage collector calls at several points during garbage collection.rtis the runtime in which you specify the callback.cbis a pointer to the callback function to add. | ||
| 186 | JS_AliasElement | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_AliasElementassigns an alternate index number for an element or numeric property associated with a native object.objis the object to which the element belongs.nameis the element's current index in the object, andaliasis the alternate index to assign to the element. | ||
| 187 | JS_AliasProperty | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_AliasPropertyassigns an alternate name for a property associated with a native object.objis the object to which the property belongs.nameis the property's current name in the object, andaliasis the alternate name to assign to the property. | ||
| 188 | JS_AlreadyHasOwnProperty | JSAPI Reference, SpiderMonkey | 
| These functions attempt to determine whether a property already exists on a specific JSObjectwithout modifying the object. By design, this search may not find a property that other property lookup functions, such asJS_LookupProperty, would find. | ||
| 189 | JS_BeginRequest | JSAPI Reference, SpiderMonkey | 
| Indicates to the JS engine that the calling thread is entering a region of code that may call into the JSAPI but does not block. | ||
| 190 | JS_BindCallable | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_BindCallablebinds the given callable to use the given object asthis. | ||
| 191 | JS_BufferIsCompilableUnit | JSAPI Reference, SpiderMonkey | 
| Given a buffer, return falseif the buffer might become a valid JavaScript statement with the addition of more lines. Otherwise returntrue. The intent is to support interactive compilation - accumulate lines in a buffer untilJS_BufferIsCompilableUnitistrue, then pass it to the compiler. | ||
| 192 | JS_CStringsAreUTF8 | JSAPI Reference, Obsolete, SpiderMonkey | 
| By default, all C/C++ strings passed into the JSAPI are treated as ISO/IEC 8859-1, also known as ISO-Latin-1. That is, each byte is treated as a Unicode character, and there is no way to pass in a string containing characters beyond U+00FF. | ||
| 193 | JS_CallFunction | JSAPI Reference, SpiderMonkey | 
| Calls a specified JS function. | ||
| 194 | JS_CheckAccess | JSAPI Reference, SpiderMonkey | 
| Check whether a running script may access a given object property. | ||
| 195 | JS_CheckForInterrupt | JSAPI_Reference, Reference, Référence, SpiderMonkey | 
| JS_CheckForInterruptchecks for the interrupt, and handle it if it's pending.JS_CheckForInterruptreturnsfalseif interrupt callback returnsfalse. | ||
| 196 | JS_ClearContextThread | JSAPI Reference, SpiderMonkey | 
| Transfer a JSContextfrom one thread to another. | ||
| 197 | JS_ClearDateCaches | Date, JSAPI Reference, JavaScript, Reference, Référence, SpiderMonkey | 
| JS_ClearDateCachesclears the cache of calculated local time from each Date object. Call to propagate a system timezone change. | ||
| 198 | JS_ClearNewbornRoots | JSAPI Reference, SpiderMonkey | 
| The last GC thing of each type (object, string, double, external string types) created on a given context is kept alive until another thing of the same type is created, using a newborn root in the context. These newborn roots help native code protect newly-created GC-things from GC invocations activated before those things can be rooted using local or global roots. | ||
| 199 | JS_ClearNonGlobalObject | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ClearNonGlobalObjectremoves all ofobj's own properties, except the special__proto__and__parent__properties, in a single operation. Properties belonging to objects onobj's prototype chain are not affected. | ||
| 200 | JS_ClearPendingException | JSAPI Reference, SpiderMonkey | 
| JS_ClearPendingExceptioncancels the currently pending exception incx, if any. (There is a pending exception if the most recently thrown exception incxhas not yet been caught or cleared.) | ||
| 201 | JS_ClearRegExpStatics | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_ClearRegExpStaticsclears the pending input string and flags of the built-inRegExpobject. | ||
| 202 | JS_ClearScope | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ClearScoperemoves all ofobj's own properties, except the special__proto__and__parent__properties, in a single operation. Properties belonging to objects onobj's prototype chain are not affected. | ||
| 203 | JS_CloneFunctionObject | JSAPI Reference, SpiderMonkey | 
| JS_CloneFunctionObjectcreates a new function object fromfunobj. The new object has the same code and argument list asfunobj, but usesparentas its enclosing scope. This can be helpful iffunobjis an extant function that you wish to use as if it were enclosed by a newly-created global object. | ||
| 204 | JS_CompareStrings | JSAPI Reference, SpiderMonkey | 
| JS_CompareStringscompares two JS strings,str1andstr2. If the strings are identical in content and length,JS_CompareStringsstores0in*result. Ifstr1is less thanstr2,*resultis less than 0. Ifstr1is greater thanstr2,*resultis greater than 0. | ||
| 205 | JS_CompileFileHandleForPrincipals | JSAPI Reference, NeedsContent, Obsolete, SpiderMonkey | 
| Please provide a description of this function. | ||
| 206 | JS_CompileFileHandleForPrincipalsVersion | JSAPI Reference, NeedsContent, Obsolete, SpiderMonkey | 
| Please provide a description for this function. | ||
| 207 | JS_CompileFunction | JSAPI Reference, SpiderMonkey | 
| JS_CompileFunctioncompiles a function from a text string,bytes, and optionally associates it with a JS object,obj.JS_CompileUCFunctionis the Unicode version of the function. | ||
| 208 | JS_CompileFunctionForPrincipals | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_CompileFunctionForPrincipalscompiles a security-enabled function from a text string,bytes, and associates it with a JS object,obj.JS_CompileUCFunctionForPrincipalsis the Unicode version of the function. | ||
| 209 | JS_CompileScript | JSAPI Reference, SpiderMonkey | 
| JS_CompileScriptcompiles a script,source, for execution.JS_CompileUCScriptis the Unicode version of the function. | ||
| 210 | JS_CompileScriptForPrincipals | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_CompileScriptForPrincipalscompiles a security-enabled script,src, for execution.JS_CompileUCScriptForPrincipalsis the Unicode version of the function. The script is associated with a JS object. | ||
| 211 | JS_CompileUCFunctionForPrincipalsVersion | JSAPI Reference, NeedsContent, Obsolete, SpiderMonkey | 
| Please provide a description for this function. | ||
| 212 | JS_CompileUTF8File | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_CompileUTF8Filecompiles the text of script in an external file location for execution by the JS engine.filenameis the name of the file containing the script to compile. | ||
| 213 | JS_CompileUTF8FileHandle | JSAPI Reference, Obsolete, SpiderMonkey | 
| No summary! | ||
| 214 | JS_ConcatStrings | JSAPI, JSAPI Reference, SpiderMonkey | 
| JS_ConcatStringsconcatenates two JS strings,str1andstr2, and returns the result. The result could be the same as one of the input strings, if the other string is zero length. When the string concatenation fails NULL is returned. | ||
| 215 | JS_ConstructObject | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ConstructObjectcreates a new object of the specified class, with the specified prototype and parent, then invokes a constructor function to initialize the new object.cxis a pointer to a context associated with the runtime in which to create the new object.claspis a pointer to the class of object to create.protoandparentmay specify objects to be used as the new object's prototype and parent. If either isNULL, the engine tries to find reasonable defaults. | ||
| 216 | JS_ContextIterator | JSAPI Reference, SpiderMonkey | 
| JS_ContextIteratorsteps through the set of contexts associated with the runtimert. Each call toJS_ContextIteratorreturns the next context in the cycle. | ||
| 217 | JS_ConvertArguments | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ConvertArgumentsprovides a convenient way to translate a series of JS values into their corresponding JS types with a single function call. It saves you from having to write separate tests and elaborate if...else statements in your function code to retrieve and translate multiple JS values for use with your own functions. | ||
| 218 | JS_ConvertArgumentsVA | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ConvertArgumentsVAis toJS_ConvertArgumentsasvprintfis toprintf. SeeJS_ConvertArgumentsfor further information. | ||
| 219 | JS_ConvertValue | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ConvertValueconverts a JavaScript value,v, to the specifiedtype. On success, the converted value is stored in*vp. Typically users of this function setvpto point tov, so that if conversion is successful,vnow contains the converted value. | ||
| 220 | JS_DecompileFunction | JSAPI Reference, SpiderMonkey | 
| JS_DecompileFunctiongenerates the complete source code of a function declaration from a function's compiled form,fun. | ||
| 221 | JS_DecompileFunctionBody | JSAPI Reference, SpiderMonkey | 
| JS_DecompileFunctionBodygenerates the source code of a function's body, minus the function keyword, name, parameters, and braces, from a function's compiled form,fun. | ||
| 222 | JS_DecompileScript | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_DecompileScriptreturns the source code ofscript. Ifscriptis a function, it callsJS_DecompileFunction. Otherwise, it returns the original source code of the script. If the script is not cached, it tries to load the source from file, and returnsnullptrif an error happened while loading. | ||
| 223 | JS_DecompileScriptObject | JSAPI Reference, NeedsContent, SpiderMonkey | 
| FIXME: Please provide a description for this function. | ||
| 224 | JS_DeepFreezeObject | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_DeepFreezeObjectfreezesobj, and all objects it refers to, recursively. This will not recurse through non-extensible objects, on the assumption that those are already deep-frozen. | ||
| 225 | JS_DefaultValue | JSAPI Reference, SpiderMonkey | 
| Renamed to JS::ToPrimitivefrom JSAPI 44. | ||
| 226 | JS_DefineConstDoubles | JSAPI Reference, SpiderMonkey | 
| JS_DefineConstDoublescreates one or more properties for a specified object,obj, where each property consists of adoublevalue. | ||
| 227 | JS_DefineElement | JSAPI Reference, SpiderMonkey | 
| JS_DefineElementdefines a numeric property for a specified object,obj. | ||
| 228 | JS_DefineFunction | JSAPI Reference, SpiderMonkey | 
| JS_DefineFunctionexposes a C/C++ function to scripts by defining a new method on an existing JavaScript object. It creates the new Function object as though by callingJS_NewFunction, then makes it a method ofobjas though by callingJS_DefineProperty.JS_DefineUCFunctionis the Unicode version of the function. | ||
| 229 | JS_DefineFunctions | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_DefineFunctionscreates zero or more functions and makes them properties (methods) of a specified object,obj, as if by callingJS_DefineFunctionrepeatedly. | ||
| 230 | JS_DefineObject | JSAPI Reference, SpiderMonkey | 
| JS_DefineObjectcreates a new object of the classclaspand assigns it to a new property of an existing object,obj.nameis the property name to assign toobjto hold the new object, andflagscontains the property attributes to set for the newly created property. | ||
| 231 | JS_DefineOwnProperty | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_DefineOwnPropertyimplements the ECMAScript defined functionObject.defineProperty. So the same restrictions apply as for that function (e.g. it is not possible to change a non-configurable property). | ||
| 232 | JS_DefineProperties | JSAPI Reference, SpiderMonkey | 
| JS_DefinePropertiescreates properties on a specified object,obj. | ||
| 233 | JS_DefineProperty | JSAPI Reference, SpiderMonkey | 
| JS_DefinePropertydefines a single property in a specified object,obj.JS_DefineUCPropertyis the Unicode version of the function.JS_DefinePropertyByIdis the same but takes aJS::HandleIdfor the property name. | ||
| 234 | JS_DefinePropertyWithTinyId | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_DefinePropertyWithTinyIddefines an object property with a tiny id.JS_DefineUCPropertyWithTinyIdis the Unicode version of the function. Except for thetinyidparameter, these functions behave exactly asJS_DefinePropertyandJS_DefineUCProperty. See those functions for more details. | ||
| 235 | JS_DeleteElement | JSAPI Reference, SpiderMonkey | 
| JS_DeleteElementremoves a specified element or numeric property,index, from an object,obj. If an object references an element belonging to a prototype, the element reference is removed from the object, but the prototype's element is not deleted. If deletion is successful,JS_DeleteElementreturnstrue. Otherwise it returnsfalse. | ||
| 236 | JS_DeleteElement2 | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_DeleteElement2removes a specified numeric property,index, from an object,obj. Ifobjinherits the specified property from a prototype, the property is removed from the object, but not from the prototype. If deletion is successful,JS_DeleteElement2storestrueto*succeededand returnstrue. Otherwise it returnsfalseand the value of*succeededis undefined. | ||
| 237 | JS_DeleteProperty | JSAPI Reference, SpiderMonkey | 
| JS_DeletePropertyremoves a specified property,name, from an object,obj.JS_DeletePropertyByIdis the same but takes ajsidfor the property name. These functions are identical toJS_DeleteProperty2andJS_DeletePropertyById2except that they do not have an out parameter. | ||
| 238 | JS_DeleteProperty2 | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_DeleteProperty2removes a specified property,name, from an object,obj, and storestrueorfalsein*succeeded. It behaves like the JavaScript expressiondelete obj[name].JS_DeleteUCProperty2is the Unicode version of the function.JS_DeletePropertyById2is the same but takes aJS::HandleIdfor the property name. | ||
| 239 | JS_DestroyContext | JSAPI Reference, SpiderMonkey | 
| These functions destroy a context, cx.JS_DestroyContextadditionally performs garbage collection to reclaim any memory that was being used bycx's global object.JS_DestroyContextNoGCdoes not perform garbage collection.JS_DestroyContextMaybeGCmay or may not perform garbage collection; the engine makes an educated guess as to whether enough memory would be reclaimed to justify the work. | ||
| 240 | JS_DestroyIdArray | JSAPI Reference, SpiderMonkey | 
| JS_DestroyIdArrayfrees the ID array pointed to byida. | ||
| 241 | JS_DestroyRuntime | JSAPI Reference, SpiderMonkey | 
| JS_DestroyRuntimefrees the specified the JavaScript runtime environment,rt. CallJS_DestroyRuntimeafter completing all other JS API calls.JS_DestroyRuntimegarbage collects and frees the memory previously allocated byJS_NewRuntime. | ||
| 242 | JS_DestroyScript | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_DestroyScriptdestroys the given compiledscript, freeing the memory allocated to it. The script must not be currently executing (in any context, at any level of the stack) and must not be used again afterwards. | ||
| 243 | JS_DoubleIsInt32 | JSAPI Reference, SpiderMonkey | 
| JS_DoubleIsInt32returnstrueifdi sequal to*ip. | ||
| 244 | JS_DoubleToInt32 | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_DoubleToInt32converts a C floating-point number of typedoubletoint32, a signed 32-bit integer. | ||
| 245 | JS_DropExceptionState | JSAPI Reference, SpiderMonkey | 
| This function destroys the specified JSExceptionStateobject, unrooting as necessary any attached exception object and freeing the memory resources associated with theJSExceptionStateobject. | ||
| 246 | JS_DumpHeap | JSAPI Reference, Obsolete, SpiderMonkey | 
| See bug 378261 for detail. | ||
| 247 | JS_DumpNamedRoots | JSAPI Reference, Obsolete, SpiderMonkey | 
| Each call to JS_AddNamedRootcreates a record in a table of named roots maintained by the garbage collector.JS_DumpNamedRootsprovides a way for the application to access the contents of that table. It calls thedumpfunction once for each named root in the given runtimert. In pseudocode: | ||
| 248 | JS_EncodeCharacters | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_EncodeCharacterscopies the characters of ajschararray into achararray, converting the 16-bit values to 8-bit values. If SpiderMonkey was built withJS_C_STRINGS_ARE_UTF8defined orJS_SetCStringsAreUTF8was called, the string is converted to UTF-8.  Otherwise each character is simply truncated to 8 bits. | ||
| 249 | JS_EncodeString | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_EncodeStringandJS_EncodeStringToUTF8convert the specified JavaScriptstrto a C string (an array of 8-bit chars). | ||
| 250 | JS_EncodeStringToBuffer | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_EncodeStringToBufferconverts the specified JavaScriptstrto a C string (an array of 8-bit chars) and fills the specifiedbufferwith up tolengthbytes of the string. It returns the length of the whole string encoding or(size_t)-1if the string can't be encoded as bytes. If the returned value is greater than the length you specified, the string was truncated. | ||
| 251 | JS_EnterCompartment | JSAPI Reference, SpiderMonkey | 
| No summary! | ||
| 252 | JS_EnterCrossCompartmentCall | JSAPI Reference, Obsolete, SpiderMonkey | 
| No summary! | ||
| 253 | JS_EnterLocalRootScope | JSAPI Reference, Obsolete, SpiderMonkey | 
| Scoped local root management allows native functions, getter/setters, etc. to avoid calling JS_AddRootandJS_RemoveRootto manage global roots temporarily. | ||
| 254 | JS_Enumerate | JSAPI Reference, SpiderMonkey | 
| JS_Enumerategets the ids of all own properties of the specified object,obj, that have theJSPROP_ENUMERATEattribute. (The term own property refers to a property that is not inherited from the object's prototype.) This is not quite the same behavior as a JavaScriptfor...inloop, which converts all property ids to strings and also enumerates inherited properties. | ||
| 255 | JS_EnumerateDiagnosticMemoryRegions | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_EnumerateDiagnosticMemoryRegionsenumerates memory regions that contain diagnostic information intended to be included in crash report minidumps. | ||
| 256 | JS_EnumerateResolvedStandardClasses | JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| JS_EnumerateResolvedStandardClassesenumerates any already-resolved standard class ids intoida, or into a newJSIdArrayifidaisNULL. Return the augmented array on success,NULLon failure withida(if it was non-null on entry) destroyed. | ||
| 257 | JS_EnumerateStandardClasses | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| The global object's class's enumerate op should call JS_EnumerateStandardClasses(cx, obj), to define eagerly duringfor...inloops any classes not yet resolved lazily. | ||
| 258 | JS_ErrorFromException | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| If objis an exception object, the exception will have (or be able to lazily create) an error report struct, andJS_ErrorFromExceptionwill return the address of that struct. Otherwise, it returnsnullptr. The lifetime of the error report struct that might be returned is the same as the lifetime of the exception object. | ||
| 259 | JS_EvaluateScript | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_EvaluateScriptcompiles and executes a script in the specified scope,obj.JS_EvaluateUCScriptis the Unicode version of the function. | ||
| 260 | JS_EvaluateScriptForPrincipals | JSAPI Reference, Obsolete, SpiderMonkey | 
| No summary! | ||
| 261 | JS_ExecuteRegExp | JSAPI Reference, SpiderMonkey | 
| JS_ExecuteRegExpandJS_NewRegExpObjectNoStaticsexecute theRegExpobject,reobj, to the specified input string,chars, from*indexpindex. | ||
| 262 | JS_ExecuteScript | JSAPI Reference, SpiderMonkey | 
| JS_ExecuteScriptexecutes a previously-compiled script,script. | ||
| 263 | JS_ExecuteScriptPart | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ExecuteScriptPartexecutes part of a previously compiled script,script. Thepartparameter must be eitherJSEXEC_PROLOGto execute the script prolog orJSEXEC_MAINto execute the main section of the script. | ||
| 264 | JS_ExecuteScriptVersion | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ExecuteScriptexecutes a previously-compiled script,script. | ||
| 265 | JS_FORGET_STRING_FLATNESS | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_FORGET_STRING_FLATNESSconvertsJSFlatString *toJSString *. | ||
| 266 | JS_FS | JSAPI Reference, SpiderMonkey | 
| Use these macros to define an array of JSFunctionSpecs to pass toJS_DefineFunctionsorJS_InitClass. | ||
| 267 | JS_FileEscapedString | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_FileEscapedStringwritesstrinto filefpescaping any non-printable or non-ASCII character. If quote is not 0, it must be a single or double quote character that will quote the output. | ||
| 268 | JS_Finish | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_Finishis obsolete. UseJS_DestroyRuntimeinstead. | ||
| 269 | JS_FlattenString | JSAPI, JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_FlattenStringflattens a stringstrand returns a pointer toJSFlatString. | ||
| 270 | JS_FlushCaches | JSAPI Reference, NeedsContent, SpiderMonkey | 
| . | ||
| 271 | JS_ForgetLocalRoot | JSAPI Reference, Obsolete, SpiderMonkey | 
| This function is used to interact with scoped local root management. See JS_EnterLocalRootScopefor more on this topic. | ||
| 272 | JS_ForwardGetPropertyTo | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_ForwardGetPropertyTois the base implementation ofJS_GetProperty,JS_GetUCProperty,JS_GetPropertyByIdetc, whereonBehalfOfis same toobj. | ||
| 273 | JS_FreezeObject | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Freezes an object. This means that other code cannot delete, add or change any properties on the object. See ES5's Object.freezemethod. | ||
| 274 | JS_GC | JSAPI Reference, SpiderMonkey | 
| JS_GCperforms garbage collection of JS objects, strings and other internal data structures that are no longer reachable in the specified context or runtime. Garbage collection frees memory so that it can be reused by the system. | ||
| 275 | JS_GET_CLASS | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GET_CLASSreturns a pointer to theJSClassassociated with a specified JS object,obj. The application must treat theJSClassas read-only. | ||
| 276 | JS_GetArrayLength | JSAPI Reference, SpiderMonkey | 
| JS_GetArrayLengthgets the.lengthproperty ofobjas though by callingJS_GetPropertyand converts it to a 32-bit unsigned integer. Ifobjis an array (seeJS_IsArrayObject), this is guaranteed to succeed, because the.lengthproperty of an array is always a number and can't be deleted or redefined. | ||
| 277 | JS_GetArrayPrototype | JSAPI Reference, SpiderMonkey | 
| JS_GetArrayPrototype()retrieves the originalArray.prototypeof a specified object,obj.  If an error occurs, it returnsNULL. | ||
| 278 | JS_GetClass | JSAPI Reference, SpiderMonkey | 
| JS_GetClassreturns a pointer to theJSClassassociated with a specified JS object,obj. The application must treat theJSClassas read-only. Ifobjhas noJSClass, this returnsNULL. | ||
| 279 | JS_GetClassObject | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetClassObjectgets the builtin class costructor for the specified prototypekey. | ||
| 280 | JS_GetClassPrototype | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetClassPrototypegets the builtin class costructor for the specified prototypekey. | ||
| 281 | JS_GetCompartmentPrivate | JSAPI Reference, SpiderMonkey | 
| Please provide a description for this function. | ||
| 282 | JS_GetConstructor | JSAPI Reference, SpiderMonkey | 
| JS_GetConstructorretrieves theconstructorproperty of a given object,obj. If the result is aFunctionobject,JS_GetConstructorreturns a pointer to that object. Otherwise, it reports an error and returnsNULL. | ||
| 283 | JS_GetContextPrivate | JSAPI Reference, SpiderMonkey | 
| Each JSContexthas two fields of typevoid *which the application may use for any purpose. They are especially useful for storing data needed by callbacks.JS_GetContextPrivateandJS_GetSecondContextPrivateget this field andJS_SetContextPrivateandJS_SetSecondContextPrivateset it. The field is initiallyNULL. | ||
| 284 | JS_GetContextThread | JSAPI Reference, SpiderMonkey | 
| Returns the ID of the associated thread for a context. | ||
| 285 | JS_GetDefaultFreeOp | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetDefaultFreeOpreturns defaultJSFreeOpfor the runtime. | ||
| 286 | JS_GetElement | JSAPI Reference, SpiderMonkey | 
| JS_GetElementexamines a specified JS object,obj, and its prototype chain, for an element or numeric property numberedindex. | ||
| 287 | JS_GetEmptyString | JSAPI, JSAPI Reference, Reference, Référence, SpiderMonkey | 
| The returned empty string has the length 0. | ||
| 288 | JS_GetEmptyStringValue | JSAPI Reference, SpiderMonkey | 
| JS_GetEmptyStringValuereturns the empty string as aJS::Value. | ||
| 289 | JS_GetErrorPrototype | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetErrorPrototypereturns the original value ofError.prototypefrom the global object of the current compartment ofcx. | ||
| 290 | JS_GetExternalStringClosure | JSAPI, JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| To determine if a string was created as an external string, you can call JS_IsExternalString. | ||
| 291 | JS_GetExternalStringFinalizer | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetExternalStringFinalizerreturns thefinparameter passed toJS_NewExternalString. | ||
| 292 | JS_GetFlatStringChars | JSAPI, JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| No summary! | ||
| 293 | JS_GetFunctionArity | JSAPI Reference, SpiderMonkey | 
| JS_GetFunctionArityreturns the number of formal parameters of a function,fun. This is the same as the function object'sarityproperty, if that property has not been overwritten. Specifically, iffunis a native function, the result is the value that was passed to thenargsparameter ofJS_DefineFunction. Otherwisefunis implemented in JavaScript, and the result is the number of identifiers in its formal parameter list (see ECMA 262-3 §13). | ||
| 294 | JS_GetFunctionCallback | JSAPI Reference, Obsolete, SpiderMonkey | 
| Returns the callback currently configured to be called when JavaScript functions are invoked or exited, as established by a prior call to JS_SetFunctionCallback. | ||
| 295 | JS_GetFunctionFlags | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetFunctionFlagsretrieves the function flags of a given JavaScript function,fun. These flags are for the JavaScript engine’s internal use. Most applications can’t do anything useful with them. | ||
| 296 | JS_GetFunctionId | JSAPI Reference, SpiderMonkey | 
| JS_GetFunctionIdreturns the name of a function,fun, as aJSString, orNULLiffunis unnamed. The returned string lives as long as fun, so you don't need to root a saved reference to it if fun is well-connected or rooted, and provided you bound the use of the saved reference by fun's lifetime. | ||
| 297 | JS_GetFunctionName | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetFunctionNameretrieves the function name associated with a function pointer,fun. The return value is either the name of a function, or the string "anonymous", which indicates that the function was not assigned a name when created. | ||
| 298 | JS_GetFunctionObject | JSAPI Reference, SpiderMonkey | 
| JS_GetFunctionObjectreturns the JavaScriptFunctionobject for a specified function pointer,fun. | ||
| 299 | JS_GetFunctionPrototype | JSAPI Reference, SpiderMonkey | 
| JS_GetFunctionPrototype()retrieves the originalFunction.prototypeof a specified object,obj.  If an error occurs, it returnsNULL. | ||
| 300 | JS_GetFunctionScript | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetFunctionScriptreturns a pointer toJSScriptfor the specified function,fun. Iffunis a native function, it returnsNULL. | ||
| 301 | JS_GetGCParameter | JSAPI Reference, SpiderMonkey | 
| JS_GetGCParameterreturns the current parameter of the garbage collection. | ||
| 302 | JS_GetGlobalForCompartmentOrNull | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetGlobalForCompartmentOrNull()returns the global object for the context and the compartment. This may returnNULLifcnever had a global (e.g., the atoms compartment), or ifc's global has been collected. | ||
| 303 | JS_GetGlobalForObject | JSAPI Reference, SpiderMonkey | 
| JS_GetGlobalForObjectreturns the last non-null object on the parent chain of the input object. | ||
| 304 | JS_GetGlobalForObject3 | |
| This page was auto-generated because a user created a sub-page to this page. | ||
| 305 | JS_GetGlobalForScopeChain | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetGlobalForScopeChain()returns the global object for whatever function is currently running on the context. In other words, it returns the global object on the current scope chain. | ||
| 306 | JS_GetGlobalObject | JSAPI Reference, Obsolete, SpiderMonkey | 
| This function is obsolete: use JS_GetGlobalForObjectorJS_GetGlobalForScopeChaininstead. The concept of a global object belonging to a context will likely be phased out in future versions of SpiderMonkey. | ||
| 307 | JS_GetImplementationVersion | JSAPI Reference, SpiderMonkey | 
| JS_GetImplementationVersionreturns a hard-coded, English language string that specifies the version number of the JS engine currently in use, and its release date. | ||
| 308 | JS_GetInstancePrivate | JSAPI Reference, SpiderMonkey | 
| JS_GetInstancePrivatedetermines if a JavaScript object,obj, is an instance of a givenJSClass,clasp, and if it is, returns a pointer to the object's private data. Otherwise it returnsNULL. | ||
| 309 | JS_GetInternedStringChars | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetInternedStringCharsreturns a pointer to the interned string. | ||
| 310 | JS_GetLatin1FlatStringChars | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetLatin1FlatStringCharsandJS_GetTwoByteFlatStringCharsreturn a pointer to the string. | ||
| 311 | JS_GetLatin1InternedStringChars | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetLatin1InternedStringCharsandJS_GetTwoByteInternedStringCharsgets the characters of the string,str. | ||
| 312 | JS_GetLatin1StringCharsAndLength | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetLatin1StringCharsAndLengthandJS_GetTwoByteStringCharsAndLengthget the characters and the length of the string,str. | ||
| 313 | JS_GetLocaleCallbacks | JSAPI Reference, SpiderMonkey | 
| JS_SetLocaleCallbacksestablishes locale callbacks. The pointer must persist as long as theJSRuntime. Passingnullptrrestores the default behaviour. | ||
| 314 | JS_GetNaNValue | JSAPI Reference, SpiderMonkey | 
| JS_GetNaNValuereturns a value of typeJS::Valuethat represents an IEEE floating-point quiet Not-a-Number (NaN). | ||
| 315 | JS_GetObjectPrototype | JSAPI Reference, SpiderMonkey | 
| JS_GetObjectPrototype()retrieves the originalObject.prototypeof a specified object,obj.  If an error occurs, it returnsNULL. | ||
| 316 | JS_GetObjectRuntime | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetObjectRuntimeretrieves a pointer to theJSRuntimefor a specifiedJSObject. | ||
| 317 | JS_GetOptions | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetOptionsretrieves the option flags of a given JS contextcx. | ||
| 318 | JS_GetOwnPropertyDescriptor | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetOwnPropertyDescriptorandJS_GetOwnPropertyDescriptorByIdget a detailed description of that property (returned indesc->obj). Ifdesc->objis null, then this property was not found on the prototype chain. | ||
| 319 | JS_GetParent | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetParentretrieves the parent object ofobj, orNULLifobjdoes not have a parent. | ||
| 320 | JS_GetParentRuntime | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetParentRuntimeretrieves a pointer to the parentJSRuntimeof the runtime for a specifiedJSContext. If thecx's runtime has no parent runtime,JS_GetParentRuntimereturnscx's runtime itself. | ||
| 321 | JS_GetPendingException | JSAPI Reference, SpiderMonkey | 
| If an exception has been thrown in the context cx, and it has not yet been caught or cleared,JS_GetPendingExceptionstores the exception object in*vpand returnstrue. | ||
| 322 | JS_GetPositiveInfinityValue | JSAPI Reference, SpiderMonkey | 
| JS_GetPositiveInfinityValuereturns aJS::Valuethat represents an IEEE floating-point positive infinity.JS_GetNegativeInfinityValuereturns the corresponding negative infinity. | ||
| 323 | JS_GetPrivate | JSAPI Reference, SpiderMonkey | 
| JS_GetPrivateaccesses an object's private data field.objmust be an instance of a class that has theJSCLASS_HAS_PRIVATEflag. | ||
| 324 | JS_GetProperty | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetPropertyexamines a specified JS objectobjand its prototype chain for a property with the specifiedname. It behaves like the JavaScript expressionobj[name].JS_GetUCPropertyis the Unicode version of the function.JS_GetPropertyByIdis the same but takes aJS::HandleIdfor the property name. | ||
| 325 | JS_GetPropertyAttributes | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetPropertyAttributesretrieves the property attributes of the property with the givennameon a given object,obj.JS_GetUCPropertyAttributesis the Unicode version of the function. | ||
| 326 | JS_GetPropertyAttrsGetterAndSetter | JSAPI Reference, Obsolete, SpiderMonkey | 
| See JS_GetPropertyAttributesfor details about these functions. The only difference is that on success, these functions also get the getter and setter functions for the property. | ||
| 327 | JS_GetPropertyDefault | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetPropertyDefaultexamines a specified JS objectobjand its prototype chain for a property with the specifiedname. | ||
| 328 | JS_GetPropertyDescriptor | JSAPI Reference, SpiderMonkey | 
| JS_GetPropertyDescriptorandJS_GetPropertyDescriptorByIdfind a specified property of an object and gets a detailed description of that property on the prototype chain (returned indesc->obj). Ifdesc->objis null, then this property was not found on the prototype chain. | ||
| 329 | JS_GetPrototype | JSAPI Reference, SpiderMonkey | 
| JS_GetPrototyperetrieves the prototype of a specified object,obj. A prototype object provides properties inherited by similar JS objects. This is the equivalent ofObject.getPrototypeOf(obj)from javascript. | ||
| 330 | JS_GetRegExpFlags | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetRegExpFlagsreturns flags of the specified object,obj. | ||
| 331 | JS_GetRegExpSource | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetRegExpSourcereturns a source string of the specified object,obj. | ||
| 332 | JS_GetReservedSlot | JSAPI Reference, SpiderMonkey | 
| If a JSClasshasJSCLASS_HAS_RESERVED_SLOTS(n)in itsflags, with n > 0, or has a non-nullJSClass.reserveSlotscallback, then objects of that class havenreserved slots in which the application may store data. These fields are not directly exposed to scripts. | ||
| 333 | JS_GetRuntime | JSAPI Reference, SpiderMonkey | 
| JS_GetRuntimeretrieves a pointer to theJSRuntimewith which a specifiedJSContext,cx, is associated. Each context is associated with a particularJSRuntimewhen it is created (seeJS_NewContext);JS_GetRuntimeprovides a convenient, programmatic way to look up the association. | ||
| 334 | JS_GetRuntimePrivate | JSAPI Reference, SpiderMonkey | 
| Each JSRuntimehas a field of typevoid *which the application may use for any purpose. It is especially useful for storing data which callbacks may then easily access.JS_GetRuntimePrivategets the value of this field andJS_SetRuntimePrivatesets it. The field is initiallyNULL. | ||
| 335 | JS_GetScopeChain | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetScopeChainreturns the firstJSObjecton the scope chain for the JavaScript code currently running in the given context,cx. | ||
| 336 | JS_GetSecurityCallbacks | JSAPI Reference, SpiderMonkey | 
| JS_SetSecurityCallbackssets the runtime's security callbacks tocallbacks. It allows the embedding to control certain aspects of JS code execution based on security settings of the global object the code is executed in. IfcallbacksisNULL, it sets callbacks to default value. | ||
| 337 | JS_GetStringBytes | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetStringBytesandJS_GetStringBytesZconvert the specified JavaScript string,str, to a C string (an array of 8-bitchars). IfJS_CStringsAreUTF8is true, then the returned string is UTF-8, and the conversion is lossless. Otherwise the high byte is simply dropped from eachjschar. On success, the return value is a pointer to the char array, which is null-terminated. On failure,JS_GetStringBytesreturns a pointer to a null-terminated empty string;JS_GetStringBytesZreturnsNULL. | ||
| 338 | JS_GetStringCharAt | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetStringCharAtandJS_GetFlatStringCharAtget the specified character from the stringstr. | ||
| 339 | JS_GetStringChars | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetStringCharsObsolete since JavaScript 1.8.5 returns a pointer to the first element of an array ofjschars. Warnings: | ||
| 340 | JS_GetStringCharsAndLength | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetStringCharsAndLengthgets the characters and the length of the string,str | ||
| 341 | JS_GetStringEncodingLength | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetStringEncodingLengthreturns the length of the specified string in bytes, regardless of its encoding. You can use this value to create a buffer to encode the string into using theJS_EncodeStringToBufferfunction. | ||
| 342 | JS_GetStringLength | JSAPI Reference, SpiderMonkey | 
| JS_GetStringLengthreports the length, in 16-bit code units, of the stringstr. This is the same as thelengthproperty of the string. This is the same as the length of the array returned byJS_GetStringChars, inchar16_ts (not bytes). | ||
| 343 | JS_GetTwoByteExternalStringChars | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_GetTwoByteExternalStringCharsgets the characters of the string,str. | ||
| 344 | JS_GetTypeName | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_GetTypeNamereturns a pointer to a string literal description of a specified JS data type,type. The following table listsJSTypesand the string literals reported byJS_GetTypeName: | ||
| 345 | JS_GetVersion | JSAPI Reference, SpiderMonkey | 
| JS_GetVersionreturns the JavaScript version currently used by the givenJSContext,cx. The result is one of theJSVersionconstants. | ||
| 346 | JS_HasArrayLength | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_HasArrayLengthdetermines if an object,obj, has alengthproperty. If the property exists,JS_HasArrayLengthstores the current value of the property in*lengthp. | ||
| 347 | JS_HasElement | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_HasElementexamines a specified JS object,obj, and its prototype chain, for an element or numeric property numberedindex. | ||
| 348 | JS_HasInstance | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_HasInstancedetermines if a specified JS value,, is an instance of JS object,obj. This function is equivalent tov instanceof objtest in JavaScript.  On success,JS_HasInstancestores the result of the instanceof test in*bpand returnstrue. On error or exception, it returnsfalse, and the value left in*bpis undefined. | ||
| 349 | JS_HasOwnProperty | JSAPI Reference, SpiderMonkey | 
| Editorial review completed. | ||
| 350 | JS_HasProperty | JSAPI Reference, SpiderMonkey | 
| JS_HasPropertysearches an object,obj, and its prototype chain, for a property with the specifiedname. It behaves like the JavaScript expressionname in obj.JS_HasUCPropertyis the corresponding Unicode API.JS_HasPropertyByIdis the same but takes aJS::HandleIdfor the property name. | ||
| 351 | JS_IdArrayGet | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IdArrayGetgets the item in the specifiedindexof the ID array pointed to byida. | ||
| 352 | JS_IdArrayLength | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IdArrayLengthgets the length of the ID array pointed to byida. | ||
| 353 | JS_IdToProtoKey | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IdToProtoKeyconverts a specified JS ID,id, to a prototype key. On success,JS_IdToProtoKeyreturns aJSProtoKey. Otherwise it returnsJSProto_Null. | ||
| 354 | JS_IdToValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IdToValueconverts a specified JS ID,id, to a JS value. On success,JS_IdToValuestores the converted value in*vpand returnstrue. Otherwise it returnsfalse. | ||
| 355 | JS_Init | JSAPI Reference, SpiderMonkey | 
| Initialize SpiderMonkey, returning true only if initialization succeeded. Once this method has succeeded, it is safe to call JS_NewRuntimeand other JSAPI methods. | ||
| 356 | JS_InitCTypesClass | JSAPI, JSAPI Reference, NeedsContent, Reference, Référence, SpiderMonkey | 
| Initialize the ctypes object on a global object. The ctypes object will be frozen. | ||
| 357 | JS_InitClass | JSAPI Reference, SpiderMonkey | 
| JS_InitClassinitializes aJSClassand (optionally) makes it visible to JavaScript code. | ||
| 358 | JS_InitStandardClasses | JSAPI Reference, SpiderMonkey | 
| JS_InitStandardClassesinitializes the built-in JavaScript global properties. These include all the standard ECMAScript global properties defined in ECMA 262-3 §15.1: | ||
| 359 | JS_InstanceOf | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_InstanceOfcan be used to check whether an object obj is of a particularJSClass. To use it this way, passNULLforargv.JS_InstanceOfreturnstrueifobjis of the given class andfalseotherwise. That is, it returnsJS_GetClass(obj) == clasp. | ||
| 360 | JS_InternJSString | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_InternJSStringconverts a stringstrto interned string (interned atom) and returns the result string asJSString *. | ||
| 361 | JS_InternString | JSAPI Reference, SpiderMonkey | 
| No summary! | ||
| 362 | JS_IsArrayObject | JSAPI Reference, SpiderMonkey | 
| JS_IsArrayObjectdetermines if a specified object,objorvalue, is anArrayobject. | ||
| 363 | JS_IsAssigning | JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| JS_IsAssigningreturnstrueif a script is executing and its current bytecode is a set (assignment) operation, even if there are native (no script) stack frames between the script and the caller toJS_IsAssigning. | ||
| 364 | JS_IsBuiltinEvalFunction | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IsBuiltinEvalFunctionreturns whether the given function is the globalevalfunction. | ||
| 365 | JS_IsBuiltinFunctionConstructor | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS::IsCallablereturns whether the given function is the globalFunctionconstructor. | ||
| 366 | JS_IsConstructing | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_IsConstructingmust be called only from aJSNativecalled from the engine. cx and vp must be the arguments that the engine passed to thatJSNative. | ||
| 367 | JS_IsConstructing_PossiblyWithGivenThisObject | JSAPI, JSAPI Reference, Obsolete, Reference, Référence, SpiderMonkey | 
| In the case of a constructor called from JS_ConstructObjectandJS_InitClasswhere the class has theJSCLASS_CONSTRUCT_PROTOTYPEflag set, SpiderMonkey passes the constructor a non-standardthisobject. In such cases, the following example would provide the additional information of whether a specialthiswas supplied. | ||
| 368 | JS_IsConstructor | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IsConstructordetermines if a specified function,funis a valid constructor object. If so,JS_IsConstructorreturnstrue. Otherwise it returnsfalse. | ||
| 369 | JS_IsExceptionPending | JSAPI Reference, SpiderMonkey | 
| JS_IsExceptionPendingreturnstrueif an exception has been thrown in the contextcxand the exception has not yet been caught or cleared. Otherwise, it returnsfalse | ||
| 370 | JS_IsExtensible | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IsExtensiblequeries[[Extensible]]property of the specified object,obj. | ||
| 371 | JS_IsExternalString | JSAPI, JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IsExternalStringreturnstrueif the string is an external string; otherwise it'sfalse. | ||
| 372 | JS_IsGlobalObject | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IsGlobalObjectreturnstrueifobjis a global object,falseotherwise. | ||
| 373 | JS_IsIdentifier | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IsIdentifiertests if the given string is a valid ECMAScript identifier. On successful,JS_IsIdentifierstores the test result to*isIdentifierand returnstrue, otherwise returnsfalseand the value of*isIdentifieris undefined. | ||
| 374 | JS_IsNative | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IsNativereturnstrueif the object is a native object. | ||
| 375 | JS_IsNativeFunction | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IsNativeFunctiondetermines if a specified function object,funobjequals a specified native function,call. If so,JS_IsNativeFunctionreturnstrue. Otherwise it returnsfalse. | ||
| 376 | JS_IsRunning | JSAPI Reference, SpiderMonkey | 
| JS_IsRunningdetermines if a script or function is currently executing in a specifiedJSContext,cx. If a script is executing,JS_IsRunningreturnstrue. Otherwise it returnsfalse. | ||
| 377 | JS_IsStopIteration | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IsStopIterationreturnstrueifvisStopIteration, otherwisefalse. | ||
| 378 | JS_IterateCompartments | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_IterateCompartmentscallscompartmentCallbackon every compartment. Beware that there is no guarantee that the compartment will survive after the callback returns. Also, barriers are disabled via the TraceSession. | ||
| 379 | JS_LeaveCompartment | JSAPI Reference, SpiderMonkey | 
| No summary! | ||
| 380 | JS_LeaveCrossCompartmentCall | JSAPI Reference, Obsolete, SpiderMonkey | 
| No summary! | ||
| 381 | JS_LeaveLocalRootScope | JSAPI Reference, Obsolete, SpiderMonkey | 
| See JS_EnterLocalRootScopefor an explanation of local root scopes. | ||
| 382 | JS_LeaveLocalRootScopeWithResult | JSAPI Reference, Obsolete, SpiderMonkey | 
| See JS_EnterLocalRootScopefor an explanation of local root scopes. | ||
| 383 | JS_LinkConstructorAndPrototype | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_LinkConstructorAndPrototypesets theprototypeproperty of class constructor function,ctor, to prototype object,protowithJSPROP_PERMANENT | JSPROP_READONLYflags, and sets theconstructorproperty ofprototoctorwith no flag. | ||
| 384 | JS_Lock | JSAPI Reference, SpiderMonkey | 
| Lock the JS run-time environment. | ||
| 385 | JS_LockGCThing | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_LockGCThingis a deprecated function that protects a specified item,thing, associated with an executable script context,cx, from garbage collection.thingis a pointer to ajsdouble,JSString, orJSObject. | ||
| 386 | JS_LookupElement | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_LookupElementexamines a specified JavaScript object,obj, for a numeric property numberedindex. | ||
| 387 | JS_LookupProperty | JSAPI Reference, Obsolete, SpiderMonkey | 
| The functions JS_LookupProperty,JS_LookupUCProperty,JS_LookupPropertyById,JS_LookupPropertyWithFlags, andJS_LookupPropertyWithFlagsByIdsearch a specified object,obj, for a property with the givenname. These functions all have similar behavior: | ||
| 388 | JS_LooselyEqual | JSAPI Reference, SpiderMonkey | 
| JS_LooselyEqualdetermines ifv1is loosely equal tov2under the JavaScript==operator, as specified in ECMA 262-3 §11.9.3.  If the comparison attempt was successful, the method returnsJS_TRUEand stores the result in*equal; otherwise it returnsJS_FALSE. | ||
| 389 | JS_MakeStringImmutable | JSAPI Reference, Obsolete, SpiderMonkey | 
| A string's characters can never be changed, but SpiderMonkey uses two string optimization techniques behind the scenes: | ||
| 390 | JS_MapGCRoots | JSAPI Reference, Obsolete, SpiderMonkey | 
| Call JS_MapGCRootsto map the GC's roots table usingmap(rp, name, data). The root is pointed at byrp; if the root is unnamed,nameis null;datais supplied from the third parameter toJS_MapGCRoots. | ||
| 391 | JS_MaybeGC | JSAPI Reference, SpiderMonkey | 
| JS_MaybeGCtries to determine whether garbage collection incx's runtime would free up enough memory to be worth the amount of time it would take. If so, it performs some garbage collection. | ||
| 392 | JS_New | JSAPI Reference, SpiderMonkey | 
| JS_Newcreates a new object as though by using the new operator, as described in ECMA 262-3 §11.2.2. | ||
| 393 | JS_NewArrayObject | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_NewArrayObjectwithcontentsparameter creates a new array object with the specifiedcontentselements.JS_NewArrayObjectdefines an enumerable array element with the valuecontents[i]on the new array. | ||
| 394 | JS_NewCompartmentAndGlobalObject | JSAPI Reference, Obsolete, SpiderMonkey | 
| No summary! | ||
| 395 | JS_NewContext | JSAPI Reference, SpiderMonkey | 
| JS_NewContextcreates a newJSContextin the runtimert. On success, it returns a pointer to the new context. Otherwise it returnsNULL. For more details about contexts, seeJSContext. For sample code that creates and initializes aJSContext, see JSAPI User Guide. | ||
| 396 | JS_NewDateObject | Date, JSAPI, JSAPI Reference, SpiderMonkey | 
| Creates and returns a new JSObjectrepresenting a JavaScriptDateobject, which is pre-configured using the specified values. | ||
| 397 | JS_NewDateObjectMsec | Date, JSAPI, JSAPI Reference, SpiderMonkey | 
| The returned JSObjectis a standard JavaScriptDate. | ||
| 398 | JS_NewDependentString | JSAPI Reference, SpiderMonkey | 
| JS_NewDependentStringcreates a new string as a substring of an existing JavaScript string,str. The new string contains the same characters as if it were created with the JavaScript methodstr.substr(start, length). | ||
| 399 | JS_NewDouble | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_NewDoubleallocates a copy of the numberdon the JavaScript garbage collection heap. This function is not very useful. To convert ajsdoubleto ajsval, useJS_NewNumberValueinstead. | ||
| 400 | JS_NewDoubleValue | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_NewDoubleValuecreates a floating-pointjsval. | ||
| 401 | JS_NewExternalString | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_NewExternalStringandJS_NewExternalStringWithClosurecreate a newJSStringwhose characters are stored in external memory, i.e., memory allocated by the application, not the JavaScript engine. Since the program allocated the memory, it will need to free it; this happens in an external string finalizer indicated by thetypeparameter. | ||
| 402 | JS_NewFunction | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_NewFunctioncreates a new JavaScript function implemented in C/C++. (To create a new function implemented in JavaScript, useJS_CompileFunctioninstead.) | ||
| 403 | JS_NewGlobalObject | JSAPI, JSAPI Reference | 
| JS_NewGlobalObjectcreates a new global object based on the specified class. | ||
| 404 | JS_NewNumberValue | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_NewNumberValueconverts a C floating-point number of typejsdoubletojsval, the type of JavaScript values. | ||
| 405 | JS_NewObject | JSAPI Reference, SpiderMonkey | 
| JS_NewObjectcreates a new object based on a specified class.cxis a pointer to a context associated with the runtime in which to establish the new object.claspis a pointer to an existing class to use for internal methods, such asfinalize.The JavaScript engine selects a prototype object for you. | ||
| 406 | JS_NewObjectForConstructor | JSAPI Reference, SpiderMonkey | 
| JS_NewObjectForConstructorcreates a new object exactly as the given constructor would if invoked withnew. This function does not run the code of the constructor function--it just creates the object. | ||
| 407 | JS_NewPlainObject | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_NewPlainObjectcreates a new plain object, likenew Object(), withObject.prototypeas[[Prototype]]. | ||
| 408 | JS_NewPropertyIterator | JSAPI Reference, Obsolete, SpiderMonkey | 
| Create an object to iterate over the enumerable own properties of obj, in arbitrary order. (This differs from longstandingfor..inloop order, which uses the order in whichobj's properties were defined. Note also that whilefor..inincludes properties inherited from prototypes, iterator objects do not.) | ||
| 409 | JS_NewRegExpObject | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_NewRegExpObjectandJS_NewUCRegExpObjectcreate a newRegExpinstance. The flags from the built-inRegExpconstructor propertiesignoreCase,global,multiline, andstickyareOR'd in with the providedflagsparameter. | ||
| 410 | JS_NewRuntime | JSAPI Reference, SpiderMonkey | 
| JS_NewRuntimeinitializes the JavaScript runtime environment. CallJS_NewRuntimebefore making any other API calls exceptJS_Init.JS_NewRuntimeallocates memory for theJSRuntimeand initializes certain internal runtime structures.maxbytesspecifies the number of allocated bytes after which garbage collection is run. IfparentRuntimeis specified, the resulting runtime shares significant amounts of read-only state (the self-hosting and initial atoms compartments). It is recommended to make use of this for every runtime in a process after the first one. | ||
| 411 | JS_NewScriptObject | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_NewScriptObjectreturns the script object associated with the givenJSScript. | ||
| 412 | JS_NewStringCopyN | JSAPI Reference, SpiderMonkey | 
| JS_NewStringCopyNallocates space for a JavaScript string and its underlying storage, and copiesncharacters from a C character array,s, into the newJSString.JS_NewUCStringCopyNis the Unicode version of the function. The two functions differ only in the type of the character arrays; both functions create ordinary JavaScript strings, and all JavaScript strings are made up of 16-bit characters. | ||
| 413 | JS_NewStringCopyZ | JSAPI Reference, SpiderMonkey | 
| JS_NewStringCopyZallocates space for a new JavaScript string and its underlying storage, and then copies the contents of a null-terminated character array,s, into the new string. On success,JS_NewStringCopyZreturns a pointer to the new JavaScript string. On error, it returnsNULL. | ||
| 414 | JS_NewUCString | JSAPI Reference, SpiderMonkey | 
| JS_NewStringcreates and returns a new string, using the memory starting atbufand ending atbuf + lengthas the character storage.JS_NewUCStringis the Unicode version of the function. | ||
| 415 | JS_NextProperty | JSAPI Reference, Obsolete, SpiderMonkey | 
| On success, JS_NextPropertyreturnstrue, with*idpcontaining the id of the next enumerable own property to visit usingiterobj, orJSID_VOIDif there is no such property left to visit. On error, it returnsfalse, and the value left in*idpis undefined. | ||
| 416 | JS_Now | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_Nowreturns microseconds since the epoch, midnight, January 1, 1970 UTC. | ||
| 417 | JS_NumberValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_NumberValueconverts a C floating-point number of typedoubletoJS::Value, the type of JavaScript values. | ||
| 418 | JS_ObjectIsDate | Date, JSAPI Reference, JavaScript, SpiderMonkey | 
| JS_ObjectIsDate()can be used to check if you are dealing with aDateobject, or aDateobject used across compartments (or windows or sites, in the browser embedding).  This function returnstrueif the object is aDate. | ||
| 419 | JS_ObjectIsFunction | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_ObjectIsFunctiontests whetherobjis a function object (faster than comparing obj's class name toFunction, but equivalent unless someone has overwritten theFunctionidentifier with a different constructor and then created instances using that constructor that might be passed in asobj). | ||
| 420 | JS_ObjectIsRegExp | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_ObjectIsRegExpdetermines if a specified object,obj, is aRegExpobject. If so,JS_ObjectIsRegExpreturnstrue. Otherwise it returnsfalse. | ||
| 421 | JS_PSGS | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| These macros encapsulate the definition of JSNative-backedJSPropertySpecs, by defining theJSNativeWrappersfor them. | ||
| 422 | JS_ParseJSON | |
| Parse a string using the JSON syntax described in ECMAScript 5 and return the corresponding value. | ||
| 423 | JS_PopArguments | JSAPI_Reference, Obsolete, SpiderMonkey | 
| JS_PopArgumentsfrees the stack frame pointer previously allocated byJS_PushArgumentsand unroots thejsvals which have been associated with it (those returned byJS_PushArgumentsas well). | ||
| 424 | JS_PreventExtensions | JSAPI Reference, SpiderMonkey | 
| All JavaScript objects recognize the concept of extensibility: whether new properties may be added to the object.  In some situations, it may be convenient to prohibit new properties.  In JavaScript this may be accomplished using the Object.preventExtensionsmethod.  The similar JSAPI method isJS_PreventExtensions. | ||
| 425 | JS_PropertyStub | JSAPI Reference, SpiderMonkey | 
| The stub functions are not designed to be called directly by a JSAPI application. Rather, they are convenient stand-ins anywhere the JSAPI requires callbacks of certain types. Examples at JSClassillustrate how stub functions can be used. | ||
| 426 | JS_PushArguments | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_PushArgumentsprovides a convenient way to translate a series of native C/C++ values tojsvals with a single function call. | ||
| 427 | JS_PutEscapedString | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_PutEscapedStringandJS_PutEscapedStringwritestrintobufferescaping any non-printable or non-ASCII character using\escapesfor JS string literals. Guarantees that a NUL is at the end of the buffer unless size is 0. Returns the length of the written output, NOT including the NUL. Thus, a return value of size or more means that the output was truncated. If buffer isnull, just returns the length of the output. If quote is not 0, it must be a single or double quote character that will quote the output. | ||
| 428 | JS_Remove*Root | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_RemoveRootremoves the variable thatrppoints to from the garbage collector's root set. | ||
| 429 | JS_RemoveExternalStringFinalizer | JSAPI Reference, Obsolete, SpiderMonkey | 
| Remove finalizerfrom the global GC finalizers table, returning its type code if found,-1if not found. | ||
| 430 | JS_RemoveRootRT | JSAPI Reference, Obsolete, SpiderMonkey | 
| Unregisters a pointer to a GC thing so that it is no longer a member of the garbage collector's root set. This enables any pointed-at GC thing to be garbage collected as needed. | ||
| 431 | JS_ReportError | JSAPI Reference, SpiderMonkey | 
| JS_ReportErroris the simplest JSAPI function for reporting errors. First it builds an error message from the givensprintf-styleformatstring and any additional arguments passed after it. The resulting error message is passed to the context'sJSErrorReportercallback, if any. | ||
| 432 | JS_ReportErrorNumber | JSAPI Reference, NeedsContent, SpiderMonkey | 
| These functions create a JSErrorReport, populate it with an error message obtained from the givenJSErrorCallback, and either report it to the current error reporter callback or create anErrorobject and set it as the pending exception. | ||
| 433 | JS_ReportOutOfMemory | JSAPI Reference, SpiderMonkey | 
| Call JS_ReportOutOfMemoryto report that an operation failed because the system is out of memory. When the JavaScript engine tries to allocate memory and allocation fails, it reports an error as though by calling this function. | ||
| 434 | JS_ReportPendingException | JSAPI Reference, SpiderMonkey | 
| If an exception is pending in the context cx,JS_ReportPendingExceptionconverts the exception to a string and reports it to the current error reporter. | ||
| 435 | JS_ResolveStandardClass | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_ResolveStandardClassresolvesid, which must contain either a string or an int, to a standard class name inobjif possible, defining the class's constructor and/or prototype and storingtruein*resolved. Ifiddoes not name a standard class or a top-level property induced by initializing a standard class, storefalsein*resolvedand just returntrue. Returnfalseon error, as usual for bool result-typed API entry points. | ||
| 436 | JS_RestoreExceptionState | JSAPI Reference, SpiderMonkey | 
| This function permits to restore any previously saved exception state which was saved into a JSExceptionStateobject created by theJS_SaveExceptionStatefunction. | ||
| 437 | JS_SET_TRACING_DETAILS | JSAPI Reference, SpiderMonkey | 
| Set debugging information about the next thing to be traced by a JSTracer. | ||
| 438 | JS_SameValue | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| SameValue slightly differs from strict equality ( ===) in that+0and-0are not the same and in thatNaNis the same asNaN. The SameValue algorithm is equivalent to the following JavaScript: | ||
| 439 | JS_SaveExceptionState | JSAPI Reference, SpiderMonkey | 
| Saves the current exception state (that is, any pending exception, or a cleared exception state) associated with the specified context cx, and returns aJSExceptionStateobject holding this state. That object may then be used to restore again the context usingJS_RestoreExceptionState, or discarded usingJS_DropExceptionState. Either of those two functions frees any memory used by theJSExceptionState. | ||
| 440 | JS_SaveFrameChain | JSAPI Reference, SpiderMonkey | 
| These two functions are used to set aside cx's call stack while that stack is inactive. After a call toJS_SaveFrameChain, it looks as if there is no code running oncx. Before callingJS_RestoreFrameChain,cx's call stack must be balanced and all nested calls toJS_SaveFrameChainmust have had matchingJS_RestoreFrameChaincalls. | ||
| 441 | JS_ScheduleGC | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_ScheduleGCsets thenextScheduledparameter of GC. | ||
| 442 | JS_SealObject | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_SealObjectprevents all write access to the object, either to add a new property, delete an existing property, or set the value or attributes of an existing property. | ||
| 443 | JS_SetAllNonReservedSlotsToUndefined | JSAPI Reference, SpiderMonkey | 
| JS_SetAllNonReservedSlotsToUndefinedassignesundefinedto all ofobj's own properties, except the special__proto__and__parent__properties, in a single operation. Properties belonging to objects onobj's prototype chain are not affected. | ||
| 444 | JS_SetArrayLength | JSAPI Reference, SpiderMonkey | 
| JS_SetArrayLengthsets the.lengthproperty of an objectobj.lengthindicates the number of elements.JS_SetArrayLength(cx, obj, n)is exactly the same as setting thelengthproperty ofobjtonusingJS_SetProperty. This is true even ifobjis not anArrayobject. | ||
| 445 | JS_SetBranchCallback | JSAPI Reference, Obsolete, SpiderMonkey | 
| If the callback returns JS_TRUE, the JS engine continues to execute the script. | ||
| 446 | JS_SetCallReturnValue2 | JSAPI Reference, Obsolete, SpiderMonkey | 
| Calling JS_SetCallReturnValue2indicates to the runtime that the native will return a value of type Reference. | ||
| 447 | JS_SetCheckObjectAccessCallback | JSAPI Reference, SpiderMonkey | 
| Set the runtime-wide check-object-access callback. This function is deprecated. In SpiderMonkey 1.8.1 and later, use JS_SetRuntimeSecurityCallbacksinstead. | ||
| 448 | JS_SetCompartmentNameCallback | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_SetCompartmentNameCallbacksets callback function which will be called to name the compartment. If the runtime has noJSCompartmentNameCallback, a compartment will be named"<unknown>"</unknown>. | ||
| 449 | JS_SetContextCallback | JSAPI Reference, SpiderMonkey | 
| JS_SetContextCallbackspecifies a callback function that is automatically called whenJSContexts are created or destroyed. Only one callback function may be specified per JS runtime. This function returns the previous context callback, if any, elseNULL. | ||
| 450 | JS_SetDefaultLocale | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_SetDefaultLocalesets the default locale for the ECMAScript Internationalization API (Intl.Collator,Intl.NumberFormat,Intl.DateTimeFormat). | ||
| 451 | JS_SetDestroyCompartmentCallback | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_SetDestroyCompartmentCallbacksets callback function which will be called when sweeping each compartment of the runtime, before deleting the compartment. | ||
| 452 | JS_SetElement | JSAPI Reference, SpiderMonkey | 
| JS_SetElementassigns a value to a numeric property of an object. It behaves like the JavaScript expressionobj[index] = v. | ||
| 453 | JS_SetErrorReporter | JSAPI Reference, SpiderMonkey | 
| JS_SetErrorReporterenables you to define and use your own error reporting mechanism in your applications. The reporter you define is automatically passed aJSErrorReportstructure when an error occurs and has been parsed byJS_ReportError.JS_SetErrorReporter | ||
| 454 | JS_SetExtraGCRoots | JSAPI Reference, SpiderMonkey | 
| Register externally maintained GC roots. | ||
| 455 | JS_SetFunctionCallback | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_SetFunctionCallbacksets a C function to be called each time a JavaScript function is invoked or exits. | ||
| 456 | JS_SetGCCallback | JSAPI Reference, SpiderMonkey | 
| JS_SetGCCallbacksets a callback function which the garbage collector calls at several points during garbage collection.rtis the runtime in which you specify the callback.cbis a pointer to the new callback function to use. | ||
| 457 | JS_SetGCParametersBasedOnAvailableMemory | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_SetGCParametersBasedOnAvailableMemoryadjusts the parameters of the garbage collection based on available memory. | ||
| 458 | JS_SetGCZeal | JSAPI Reference, SpiderMonkey | 
| JS_SetGCZealsets the level of additional garbage collection to perform for a runtime, for the purpose of finding or reproducing bugs. | ||
| 459 | JS_SetGlobalObject | JSAPI Reference, Obsolete, SpiderMonkey | 
| This function is obsolete; see also JS_GetGlobalObject. | ||
| 460 | JS_SetICUMemoryFunctions | |
| Sets the memory allocation and deallocation functions used by the ICU internationalization library. | ||
| 461 | JS_SetInterruptCallback | JSAPI_Reference, Reference, Référence, SpiderMonkey | 
| These functions allow setting an interrupt callback that will be called from the JS thread some time after any thread triggered the callback using JS_RequestInterruptCallback.To schedule the GC and for other activities the engine internally triggers interrupt callbacks. The embedding should thus not rely on callbacks being triggered through the external API only. | ||
| 462 | JS_SetNativeStackQuota | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| No summary! | ||
| 463 | JS_SetObjectPrincipalsFinder | JSAPI Reference, SpiderMonkey | 
| Set the runtime-wide object-principals-finder callback. This function is deprecated. In SpiderMonkey 1.8.1 or later, use JS_SetRuntimeSecurityCallbacksinstead. | ||
| 464 | JS_SetOperationCallback | JSAPI Reference, Obsolete, SpiderMonkey | 
| These functions allow setting an operation callback that will be called from the JS thread some time after any thread triggered the callback using JS_TriggerOperationCallback.To schedule the GC and for other activities the engine internally triggers operation callbacks. The embedding should thus not rely on callbacks being triggered through the external API only. | ||
| 465 | JS_SetOptions | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_SetOptionssets the option flags of a given JS contextcx. This function returns a uint32 value containing the previous values of the flags. | ||
| 466 | JS_SetParent | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_SetParentsets an object's parent. | ||
| 467 | JS_SetPendingException | JSAPI Reference, SpiderMonkey | 
| JS_SetPendingExceptionsets the current exception being thrown within a context. If an exception is already being thrown, it is replaced with the new one given. | ||
| 468 | JS_SetPrincipalsTranscoder | JSAPI Reference, SpiderMonkey | 
| Set the runtime-wide principals transcoder callback. This function is deprecated. In SpiderMonkey 1.8.1 or later, use JS_SetRuntimeSecurityCallbacksinstead. | ||
| 469 | JS_SetPrivate | JSAPI Reference, SpiderMonkey | 
| If a JSClasshas theJSCLASS_HAS_PRIVATEflag, each object of that class has a private field of typevoid *which the application may use for any purpose. It is especially useful for storing C/C++ data that should not be directly visible to scripts. For example, aSocketclass might use the private data field to store the socket handle. | ||
| 470 | JS_SetProperty | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_SetPropertyassigns the valuevto the propertynameof the objectobj. It behaves like the JavaScript expressionobj[name] = v.JS_SetUCPropertyis the Unicode version of the function.JS_SetPropertyByIdis the same but takes aJS::HandleIdfor the property name. | ||
| 471 | JS_SetPropertyAttributes | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_SetPropertyAttributessets the attributes for a specified property,nameof an objectobj.JS_SetUCPropertyAttributesis the Unicode version of the function. | ||
| 472 | JS_SetPrototype | JSAPI Reference, SpiderMonkey | 
| JS_SetPrototypesets the prototype object for a specified object. A prototype object provides properties that are shared by similar JS object instances. Ordinarily you set a prototype for an object when you create the object withJS_NewObject, but if you do not set a prototype at that time, you can later callJS_SetPrototypeto do so. | ||
| 473 | JS_SetRegExpInput | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_SetRegExpInputsets the pending input string of the built-inRegExpobject to the specifiedinputstring. TheJSREG_MULTILINEis set tomultilineparameter, and other flags are all reset. | ||
| 474 | JS_SetScriptStackQuota | JSAPI Reference, Obsolete, SpiderMonkey | 
| Set the quota on the number of bytes that stack-like data structures can use when the runtime compiles and executes scripts. These structures also consume heap space, so JS_SetThreadStackLimitdoes not bound their size. The default quota is 32MB which is quite generous. | ||
| 475 | JS_SetThreadStackLimit | JSAPI Reference, Obsolete, SpiderMonkey | 
| No summary! | ||
| 476 | JS_SetVersion | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_SetVersionattempts to set the version of JavaScript to version for a specified executable script context,cx. The version comes from theJSVersionenumerated type. | ||
| 477 | JS_SetVersionForCompartment | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_SetVersionForCompartmentattempts to set the version of JavaScript to version for a specified compartment,compartment. The version comes from theJSVersionenumerated type. | ||
| 478 | JS_ShutDown | JSAPI Reference, SpiderMonkey | 
| Destroys all free-standing resources allocated by SpiderMonkey, not associated with any JSRuntime,JSContext, or other structure. | ||
| 479 | JS_StrictlyEqual | JSAPI Reference, SpiderMonkey | 
| JS_StrictlyEqualdetermines ifv1is strictly equal tov2under the JavaScript===operator, as specified in ECMA 262-3 §11.9.6. If the comparison attempt was successful, the method returnstrueand stores the result in*equal; otherwise it returnsfalse. | ||
| 480 | JS_StringEqualsAscii | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_StringEqualsAsciiandJS_FlatStringEqualsAsciicompare stringstrand ASCII stringasciiBytes. | ||
| 481 | JS_StringHasBeenInterned | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_StringHasBeenInternedreturnstrueif the stringstris interned. | ||
| 482 | JS_StringHasLatin1Chars | JSAPI, JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_StringHasLatin1Charsreturnstrueiff the string's characters are stored as Latin1. | ||
| 483 | JS_StringIsFlat | JSAPI, JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_StringIsFlatreturnstrueif the string is flattened. | ||
| 484 | JS_StringToVersion | JSAPI Reference, SpiderMonkey | 
| JS_StringToVersionattempts to convert the versionstringto aJSVersionvalue.JS_StringToVersionmay return any of the following values: | ||
| 485 | JS_SuspendRequest | JSAPI Reference, SpiderMonkey | 
| Suspends the calling thread's current request, if any, to allow the thread to block or perform time-consuming calculations. | ||
| 486 | JS_THREADSAFE | JSAPI Reference, SpiderMonkey | 
| JS_THREADSAFEwas a compile-time option that enables support for running multiple threads of JavaScript code concurrently as long as no objects or strings are shared between them. | ||
| 487 | JS_ThrowStopIteration | JSAPI Reference, SpiderMonkey | 
| JS_ThrowStopIterationthrows the appropriateStopIterationobject for the function currently executing incx. | ||
| 488 | JS_ToggleOptions | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ToggleOptionstoggles context-wide options. It is equivalent to. | ||
| 489 | JS_TracerInit | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_TraceChildrenand other tracing APIs call the tracer callback for each traceable thing directly referenced by a particular object or runtime structure. It is the callback's responsibility to ensure the traversal of the full object graph, if desired, by eventually callingJS_TraceChildrenon the passedthing. In this case the callback must be prepared to deal with cycles in the traversal graph. | ||
| 490 | JS_TypeOfValue | JSAPI Reference, SpiderMonkey | 
| JS_TypeOfValueexamines a specified JS value,v, and returns its JS data type. The return value is always one ofJSTYPE_VOID,JSTYPE_OBJECT,JSTYPE_FUNCTION,JSTYPE_STRING,JSTYPE_NUMBER, orJSTYPE_BOOLEAN. | ||
| 491 | JS_Unlock | JSAPI Reference, SpiderMonkey | 
| Unlock a previously locked JS run-time environment. | ||
| 492 | JS_ValueToBoolean | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ValueToBooleanconverts a specified JavaScript value,v, to a boolean value. It implements the ToBoolean operator specified in ECMA 262-3 §9.2. On success,JS_ValueToBooleanstores the converted value in*bpand returnsJS_TRUE. On error or exception, it returnsJS_FALSE, and the value left in*bpis undefined. | ||
| 493 | JS_ValueToECMAInt32 | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ValueToECMAInt32,JS_ValueToECMAUint32, andJS_ValueToUint16convert a JavaScript value to various integer types as specified in the ECMAScript specification. | ||
| 494 | JS_ValueToFunction | JSAPI Reference, SpiderMonkey | 
| Convert a JS::Valueto aJSFunction. | ||
| 495 | JS_ValueToId | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_ValueToIdconverts a specifiedJS::Value,v, to ajsid. Ifvis an integer,*idpreceives an integerjsid. Otherwise, if E4X support is enabled andvis an object,*idpreceives an objectjsid. Otherwise,*idpreceives an interned stringjsidbased on the value ofv. Ifvis not a string, it is converted to a string as if by callingJS_ValueToString. | ||
| 496 | JS_ValueToInt32 | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ValueToInt32converts a specified JS value,v, to a 32-bit signed integer (-2147483648 to 2147483647). First it convertsvto a floating-point number as if by callingJS::ToNumber. If the result isNaN, an infinity, or a number outside the 32-bit range,JS_ValueToInt32reports an error and conversion fails. Otherwise, the floating-point number is rounded to the nearest integer value. | ||
| 497 | JS_ValueToNumber | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ValueToNumberconverts a JavaScript value to a number. It implements the ToNumber operator described in ECMA 262-3 §9.3. | ||
| 498 | JS_ValueToObject | JSAPI Reference, SpiderMonkey | 
| JS_ValueToObjectconverts a specified JavaScript value,v, to an object. On success, this function stores eitherNULLor a pointer to the resulting object in*objpand returnstrue. Otherwise it returnsfalseand the value left in*objpis unspecified. | ||
| 499 | JS_ValueToSource | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_ValueToSourceconverts a specified JavaScript value,v, to a JavaScript source. | ||
| 500 | JS_ValueToString | JSAPI Reference, Obsolete, SpiderMonkey | 
| JS_ValueToStringconverts a specified JavaScript value,v, to a string. It implements the ToString operator specified in ECMA 262-3 §9.8. The result is like the JavaScript expression""+v. | ||
| 501 | JS_VersionToString | JSAPI Reference, SpiderMonkey | 
| JS_VersionToStringattempts to convert theversionto aconst char *string representation.JS_VersionToStringmay return any of the following values: | ||
| 502 | JS_YieldRequest | JSAPI Reference, SpiderMonkey | 
| Momentarily suspend the current JSAPI request, allowing garbage collection to run if another thread has requested it. | ||
| 503 | JS_freeop | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_freeopis a wrapper forjs_free(p)that may delayjs_free(p)invocation as a performance optimization as specified by the givenJSFreeOpinstance. | ||
| 504 | JS_malloc | JSAPI Reference, SpiderMonkey | 
| JS_mallocallocates a region of memorynbytesin size. On success,JS_mallocreturns a pointer to the beginning of the region. As with the standard C functionmalloc, memory allocated byJS_mallocis uninitialized. | ||
| 505 | JS_updateMallocCounter | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| JS_updateMallocCounterdecrements malloc counter of GC and the zone of the context. | ||
| 506 | OBJECT_TO_JSVAL | JSAPI Reference, Obsolete, SpiderMonkey | 
| OBJECT_TO_JSVALcastsobjfrom typeJSObject *tojsval. IfobjisNULL, the result isJSVAL_NULL. | ||
| 507 | PRIVATE_TO_JSVAL | JSAPI Reference, Obsolete, SpiderMonkey | 
| With PRIVATE_TO_JSVAL(), an application can store a private data pointer,p, as ajsval. This can be useful with reserved slots. | ||
| 508 | Property attributes | Attribute, JSAPI Reference, Reference, Référence, SpiderMonkey | 
| Some property attributes are defined in the ECMAScript standard, in ECMA 262-3 §8.6.1. SpiderMonkey additionally defines several non-standard property attributes. | ||
| 509 | STRING_TO_JSVAL | JSAPI Reference, Obsolete, SpiderMonkey | 
| STRING_TO_JSVALcasts a givenJSString *tojsval.strmust be a non-null pointer of typeJSString *. The conversion always succeeds. | ||
| 510 | Stored value | JSAPI Reference, JavaScript, SpiderMonkey | 
| In the JSAPI, the stored value of an object property is its last known value. For a data property, this is exactly the same thing as the property's current value. | ||
| 511 | jschar | JSAPI Reference, Obsolete, SpiderMonkey | 
| jschar, a typedef for the standard C++ type char16_t, will be removed in JSAPI 38. Functions that usejscharwill usechar16_tdirectly. Embedder code should usechar16_t, too. (See bug 1063962.) | ||
| 512 | jsdouble | JSAPI Reference, Obsolete, SpiderMonkey | 
| jsdoubleis a C floating-point number type. It is defined to be a 64-bit, IEEE 754 compliant type. See ECMA 262-3 §8.5. Arithmetic onjsdoublevalues in C should behave exactly like the floating-point arithmetic in JavaScript, except that C and JavaScript may treat not-a-number values differently. | ||
| 513 | jsid | JSAPI Reference, Reference, Référence, SpiderMonkey | 
| jsidis either a 31-bit signed integer, interned string or object. | ||
| 514 | jsint | JSAPI Reference, Obsolete, SpiderMonkey | 
| jsintandjsuintare 32-bit integer types. | ||
| 515 | JSDBGAPI | JavaScript, SpiderMonkey | 
| These functions can be used to profile a SpiderMonkey application using the Mac profiler, Shark. See Profiling JavaScript with Shark. | ||
| 516 | Java SpiderMonkey - MDN | Build documentation, Guide, SpiderMonkey | 
| Use these instructions to build the latest SpiderMonkey source code. | ||
| 517 | Parser API | API, Guide, JavaScript, SpiderMonkey | 
| Example: | ||
| 518 | Profiling SpiderMonkey | Guide | 
| Editorial review completed. | ||
| 519 | Running Automated JavaScript Tests | Automated testing, Build documentation, Guide, QA, SpiderMonkey | 
| The jstests shell harness is js/src/tests/jstests.py. Basic usage is: | ||
| 520 | Running Parsemark | SpiderMonkey, tests | 
| Here's how you get your mitts on it. The test files are not checked into the source tree because they're non-Mozilla JS code. | ||
| 521 | SavedFrame | SpiderMonkey | 
| A SavedFrameinstance is a singly linked list of stack frames. It represents a JavaScript call stack at a past moment of execution. Younger frames hold a reference to the frames that invoked them. The older tails are shared across many younger frames. | ||
| 522 | Setting up CDT to work on SpiderMonkey | Developing Mozilla, Eclipse, IDE, SpiderMonkey, Tools | 
| For CDT to index all code, SpiderMonkey has to be built with debug information. The full process of and requisites for doing so are described here. Please follow those instructions up until the point of invoking configure. | ||
| 523 | Shell global objects | JavaScript, NeedsContent, SpiderMonkey | 
| These are the global objects that are set up automatically by the SpiderMonkey jscommand-line interpreter when you start the program. | ||
| 524 | SpiderMonkey Build Documentation | Build documentation, Guide, SpiderMonkey | 
| Use these instructions to build the latest SpiderMonkey source code. | ||
| 525 | Rebranding SpiderMonkey (1.8.5) | Build documentation, SpiderMonkey | 
| After installing the build pre-requisites and downloading the SpiderMonkey source tarball issue the following commands at the terminal: | ||
| 526 | SpiderMonkey Internals | Guide, JavaScript, NeedsUpdate, SpiderMonkey | 
| At heart, SpiderMonkey is a fast interpreter that runs an untyped bytecode and operates on values of type JS::Value—type-tagged values that represent the full range of JavaScript values. In addition to the interpreter, SpiderMonkey contains a Just-In-Time (JIT) compiler, a garbage collector, code implementing the basic behavior of JavaScript values, a standard library implementing ECMA 262-5.1 §15 with various extensions, and a few public APIs. | ||
| 527 | 64-bit Compatibility | SpiderMonkey | 
| The following types or typedefs are always 64-bit on 64-bit platforms, and 32-bit on 32-bit platforms: | ||
| 528 | Bytecode Descriptions | SpiderMonkey | 
| This document is automatically generated from Opcodes.h by make_opcode_doc.py. | ||
| 529 | Bytecodes | SpiderMonkey | 
| SpiderMonkey bytecodes are the canonical form of code representation that is used in the JavaScript engine. The JavaScript frontend constructs an AST from the source text, then emits stack-based bytecodes from that AST as a part of the JSScript data structure. Bytecodes can reference atoms and objects (typically by array index) which are also contained in the JSScript data structure. | ||
| 530 | Functions | SpiderMonkey | 
| There are several flavors of JavaScript function. All are JSObjects of the same class,js_FunctionClass. | ||
| 531 | Garbage collection | Guide, NeedsContent, SpiderMonkey | 
| SpiderMonkey has a mark-sweep garbage collection (GC) with an optionally enabled incremental marking mode. The mark phase uses a mark stack, as required by incremental marking. Sweeping of objects without finalizers is deferred to a background thread. | ||
| 532 | Invariants | SpiderMonkey | 
| or, "The Zen of SpiderMonkey". | ||
| 533 | Property cache | SpiderMonkey | 
| SpiderMonkey's property cache is an internal data structure used to speed up property accesses in the interpreter and to communicate between the interpreter and JIT. | ||
| 534 | Self-hosted builtins in SpiderMonkey | JavaScript, SpiderMonkey | 
| All self-hosted code is strict, so self-hosted functions invoked in a nullorundefinedscope won't be run in the scope of the global object. | ||
| 535 | SpiderMonkey Internals: Thread Safety | Guide, SpiderMonkey | 
| This page describes implementation details of the SpiderMonkey JavaScript engine. It is mainly of interest to people working on SpiderMonkey itself. See JS_THREADSAFEfor a gentler introduction to using SpiderMonkey in a multi-threaded application. | ||
| 536 | Tracing JIT | SpiderMonkey | 
| The tracing JIT in SpiderMonkey consists of a generic, low level component called nanojit which is co-maintained between Adobe and Mozilla, and a SpiderMonkey-specific high level component called jstracer. The nanojit component is language agnostic, and contains no knowledge about SpiderMonkey or any other part of the Mozilla codebase. The jstracer component consists of a monitor and a recorder. The monitor watches the executing SpiderMonkey interpreter. When the monitor determines that the interpreter has entered a region of code that would benefit from native compilation, the monitor activates the recorder. The recorder records the activity of the interpreter, using nanojit to build an efficient, native representation of the execution called a fragment. The monitor then calls into the native code stored in the fragment. | ||
| 537 | SpiderMonkey compartments | Guide, NeedsContent, NeedsExample, SpiderMonkey | 
| No summary! | ||
| 538 | SpiderMonkey releases | SpiderMonkey | 
| No summary! | ||
| 539 | SpiderMonkey 1.8 | SpiderMonkey | 
| SpiderMonkey 1.8 has one known significant regression from 1.7. | ||
| 540 | SpiderMonkey 1.8.5 | SpiderMonkey | 
| SpiderMonkey 1.8.5 is supported on all the platforms where Firefox 4 runs. | ||
| 541 | SpiderMonkey 1.8.7 | SpiderMonkey | 
| DRAFT IN PROGRESS - This is a draft, and right now it's mostly just a copy of the 1.8.5 release notes. | ||
| 542 | SpiderMonkey 1.8.8 | SpiderMonkey | 
| SpiderMonkey 1.8.8 is supported on all the platforms where Firefox INSERT-ACTUAL-FIREFOX-VERSION-NUMBER-HERE runs. | ||
| 543 | SpiderMonkey 17 | SpiderMonkey | 
| SpiderMonkey 17 is supported on all the platforms where Firefox 17 runs. | ||
| 544 | SpiderMonkey 24 | SpiderMonkey | 
| SpiderMonkey 24 is supported on all the platforms where Firefox 24 runs. Compiling it requires a C++ compiler, and the JSAPI can only be used from C++ code. (This change was motivated by garbage collector improvements, which lean quite heavily on C++'s support for RAII through constructors and destructors.) If you are compiling with Microsoft's Visual Studio, note that the minimum supported version is MSVC10/2010: MSVC8/9 support has been dropped. | ||
| 545 | SpiderMonkey 31 | SpiderMonkey | 
| SpiderMonkey 31 is supported on all the platforms where Firefox 31 runs. Compiling it requires a C++ compiler, and the JSAPI can only be used from C++ code. If you are compiling with Microsoft's Visual Studio, note that the minimum supported version is MSVC10/2010: MSVC8/9 support has been dropped. | ||
| 546 | SpiderMonkey 38 | SpiderMonkey | 
| SpiderMonkey 38 is supported on all the platforms where Firefox 38 runs. Compiling it requires a C++ compiler, and the JSAPI can only be used from C++ code. If you are compiling with Microsoft's Visual Studio, note that the minimum supported version is MSVC10/2010. | ||
| 547 | SpiderMonkey 45 | |
| SpiderMonkey 45 is supported on all platforms able to run Firefox 45. Compiling it requires a C++ compiler, and the JSAPI can only be used from C++ code. If you are compiling with Microsoft's Visual Studio, note the minimum supported version is MSVC 2013. | ||
| 548 | Split object | JSAPI Reference, JavaScript, SpiderMonkey | 
| In SpiderMonkey, a split object is made up of two JSObjects: an inner object and an outer object. | ||