A JavaScript Object
Framework
- JavaScriptCore
A JavaScript Object
Framework
func JSClass Create(Unsafe Pointer<JSClass Definition>!)Creates a JavaScript class suitable for use with JSObjectMake.
func JSClass Release(JSClass Ref!)Releases a JavaScript class.
func JSClass Retain(JSClass Ref!)Retains a JavaScript class.
func JSObject Call As Constructor(JSContext Ref!, JSObject Ref!, Int, Unsafe Pointer<JSValue Ref?>!, Unsafe Mutable Pointer<JSValue Ref?>!)Calls an object as a constructor.
func JSObject Copy Property Names(JSContext Ref!, JSObject Ref!)Gets the names of an object's enumerable properties.
func JSObject Delete Property(JSContext Ref!, JSObject Ref!, JSString Ref!, Unsafe Mutable Pointer<JSValue Ref?>!)Deletes a property from an object.
func JSObject Get Private(JSObject Ref!)Gets an object's private data.
func JSObject Get Property(JSContext Ref!, JSObject Ref!, JSString Ref!, Unsafe Mutable Pointer<JSValue Ref?>!)Gets a property from an object.
func JSObject Get Property At Index(JSContext Ref!, JSObject Ref!, UInt32, Unsafe Mutable Pointer<JSValue Ref?>!)Gets a property from an object by numeric index.
func JSObject Get Prototype(JSContext Ref!, JSObject Ref!)Gets an object's prototype.
func JSObject Has Property(JSContext Ref!, JSObject Ref!, JSString Ref!)Tests whether an object has a given property.
func JSObject Is Constructor(JSContext Ref!, JSObject Ref!)Tests whether an object can be called as a constructor.
func JSObject Is Function(JSContext Ref!, JSObject Ref!)Tests whether an object can be called as a function.
func JSObject Make(JSContext Ref!, JSClass Ref!, Unsafe Mutable Raw Pointer!)Creates a JavaScript object.
func JSObject Make Array(JSContext Ref!, Int, Unsafe Pointer<JSValue Ref?>!, Unsafe Mutable Pointer<JSValue Ref?>!)Creates a JavaScript Array object.
func JSObject Make Constructor(JSContext Ref!, JSClass Ref!, JSObject Call As Constructor Callback!)Convenience method for creating a JavaScript constructor.
func JSObject Make Date(JSContext Ref!, Int, Unsafe Pointer<JSValue Ref?>!, Unsafe Mutable Pointer<JSValue Ref?>!)Creates a JavaScript Date object, as if by invoking the built-in Date constructor.
func JSObject Make Error(JSContext Ref!, Int, Unsafe Pointer<JSValue Ref?>!, Unsafe Mutable Pointer<JSValue Ref?>!)Creates a JavaScript Error object, as if by invoking the built-in Error constructor.
func JSObject Make Function(JSContext Ref!, JSString Ref!, UInt32, Unsafe Pointer<JSString Ref?>!, JSString Ref!, JSString Ref!, Int32, Unsafe Mutable Pointer<JSValue Ref?>!)Creates a function with a given script as its body.
func JSObject Make Function With Callback(JSContext Ref!, JSString Ref!, JSObject Call As Function Callback!)Convenience method for creating a JavaScript function with a given callback as its implementation.
func JSObject Make Reg Exp(JSContext Ref!, Int, Unsafe Pointer<JSValue Ref?>!, Unsafe Mutable Pointer<JSValue Ref?>!)Creates a JavaScript RegExp object, as if by invoking the built-in RegExp constructor.
func JSObject Set Private(JSObject Ref!, Unsafe Mutable Raw Pointer!)Sets a pointer to private data on an object.
func JSObject Set Property At Index(JSContext Ref!, JSObject Ref!, UInt32, JSValue Ref!, Unsafe Mutable Pointer<JSValue Ref?>!)Sets a property on an object by numeric index.
func JSObject Set Prototype(JSContext Ref!, JSObject Ref!, JSValue Ref!)Sets an object's prototype.
func JSProperty Name Accumulator Add Name(JSProperty Name Accumulator Ref!, JSString Ref!)Adds a property name to a JavaScript property name accumulator.
func JSProperty Name Array Get Count(JSProperty Name Array Ref!)Gets a count of the number of items in a JavaScript property name array.
func JSProperty Name Array Get Name At Index(JSProperty Name Array Ref!, Int)Gets a property name at a given index in a JavaScript property name array.
func JSProperty Name Array Release(JSProperty Name Array Ref!)Releases a JavaScript property name array.
func JSProperty Name Array Retain(JSProperty Name Array Ref!)Retains a JavaScript property name array.
See the Overview section above for header-level documentation.
typealias JSObject Call As Constructor CallbackThe callback invoked when an object is used as a constructor in a 'new' expression.
typealias JSObject Call As Function CallbackThe callback invoked when an object is called as a function.
typealias JSObject Convert To Type CallbackThe callback invoked when converting an object to a particular JavaScript type.
typealias JSObject Delete Property CallbackThe callback invoked when deleting a property.
typealias JSObject Finalize CallbackThe callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread.
typealias JSObject Get Property CallbackThe callback invoked when getting a property's value.
typealias JSObject Get Property Names CallbackThe callback invoked when collecting the names of an object's properties.
typealias JSObject Has Instance CallbackhasInstance The callback invoked when an object is used as the target of an 'instanceof' expression.
typealias JSObject Has Property CallbackThe callback invoked when determining whether an object has a property.
typealias JSObject Initialize CallbackThe callback invoked when an object is first created.
typealias JSObject Set Property CallbackThe callback invoked when setting a property's value.
See the Overview section above for header-level documentation.
typealias JSClass AttributesA set of JSClassAttributes. Combine multiple attributes by logically ORing them together.
struct JSClass DefinitionThis 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.
typealias JSProperty AttributesA set of JSPropertyAttributes. Combine multiple attributes by logically ORing them together.
struct JSStatic FunctionThis structure describes a statically declared function property.
struct JSStatic ValueThis structure describes a statically declared value property.
See the Overview section above for header-level documentation.
Defines the JavaScriptCore interface engine
A UTF16 character buffer that is the fundamental string representation in JavaScript.
Contains CFString convenience methods.
A JavaScript value that is the base type for all JavaScript values and the polymorphic functions on them.