JSObjectRef.h

A JavaScript Object.

Topics

Functions

JSClassCreate

Creates a JavaScript class suitable for use with JSObjectMake.

JSClassRelease

Releases a JavaScript class.

JSClassRetain

Retains a JavaScript class.

JSObjectCallAsConstructor

Calls an object as a constructor.

JSObjectCallAsFunction

Calls an object as a function.

JSObjectCopyPropertyNames

Gets the names of an object’s enumerable properties.

JSObjectDeleteProperty

Deletes a property from an object.

JSObjectGetPrivate

Gets an object’s private data.

JSObjectGetProperty

Gets a property from an object.

JSObjectGetPropertyAtIndex

Gets a property from an object by numeric index.

JSObjectGetPrototype

Gets an object’s prototype.

JSObjectHasProperty

Tests whether an object has a given property.

JSObjectIsConstructor

Tests whether an object can be called as a constructor.

JSObjectIsFunction

Tests whether an object can be called as a function.

JSObjectMake

Creates a JavaScript object.

JSObjectMakeArray

Creates a JavaScript Array object.

JSObjectMakeConstructor

Convenience method for creating a JavaScript constructor.

JSObjectMakeDate

Creates a JavaScript Date object, as if by invoking the built-in Date constructor.

JSObjectMakeError

Creates a JavaScript Error object, as if by invoking the built-in Error constructor.

JSObjectMakeFunction

Creates a function with a given script as its body.

JSObjectMakeFunctionWithCallback

Convenience method for creating a JavaScript function with a given callback as its implementation.

JSObjectMakeRegExp

Creates a JavaScript RegExp object, as if by invoking the built-in RegExp constructor.

JSObjectSetPrivate

Sets a pointer to private data on an object.

JSObjectSetProperty

Sets a property on an object.

JSObjectSetPropertyAtIndex

Sets a property on an object by numeric index.

JSObjectSetPrototype

Sets an object’s prototype.

JSPropertyNameAccumulatorAddName

Adds a property name to a JavaScript property name accumulator.

JSPropertyNameArrayGetCount

Gets a count of the number of items in a JavaScript property name array.

JSPropertyNameArrayGetNameAtIndex

Gets a property name at a given index in a JavaScript property name array.

JSPropertyNameArrayRelease

Releases a JavaScript property name array.

JSPropertyNameArrayRetain

Retains a JavaScript property name array.

Callbacks

See the Overview section above for header-level documentation.

JSObjectCallAsConstructorCallback

The callback invoked when an object is used as a constructor in a 'new' expression.

JSObjectCallAsFunctionCallback

The callback invoked when an object is called as a function.

JSObjectConvertToTypeCallback

The callback invoked when converting an object to a particular JavaScript type.

JSObjectDeletePropertyCallback

The callback invoked when deleting a property.

JSObjectFinalizeCallback

The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread.

JSObjectGetPropertyCallback

The callback invoked when getting a property’s value.

JSObjectGetPropertyNamesCallback

The callback invoked when collecting the names of an object’s properties.

JSObjectHasInstanceCallback

hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression.

JSObjectHasPropertyCallback

The callback invoked when determining whether an object has a property.

JSObjectInitializeCallback

The callback invoked when an object is first created.

JSObjectSetPropertyCallback

The callback invoked when setting a property’s value.

Data Types

See the Overview section above for header-level documentation.

JSClassAttributes

A set of JSClassAttributes. Combine multiple attributes by logically ORing them together.

JSClassDefinition

This structure contains properties and callbacks that define a type of object. All fields other than the version field are optional. Any pointer may be NULL.

JSPropertyAttributes

A set of JSPropertyAttributes. Combine multiple attributes by logically ORing them together.

JSStaticFunction

This structure describes a statically declared function property.

JSStaticValue

This structure describes a statically declared value property.

Constants

See the Overview section above for header-level documentation.

See Also

Legacy JavaScriptCore APIs

JSBase.h

Defines the JavaScriptCore interface engine.

JSStringRef.h

A UTF16 character buffer that is the fundamental string representation in JavaScript.

JSStringRefCF.h

Contains CFString convenience methods.

JSValueRef.h

A JavaScript value that is the base type for all JavaScript values and the polymorphic functions on them.