Documentation
¶
Overview ¶
Package javascriptcore provides a fluent Go API over the macOS JavaScriptCore framework.
Index ¶
- func CurrentArguments() *foundation.NSArray[objc.ID]
- func JSBigIntCreateWithDouble(ctx unsafe.Pointer, value float64, exception unsafe.Pointer) unsafe.Pointer
- func JSBigIntCreateWithInt64(ctx unsafe.Pointer, integer int64, exception unsafe.Pointer) unsafe.Pointer
- func JSBigIntCreateWithString(ctx unsafe.Pointer, string_ unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
- func JSBigIntCreateWithUInt64(ctx unsafe.Pointer, integer uint64, exception unsafe.Pointer) unsafe.Pointer
- func JSCheckScriptSyntax(ctx unsafe.Pointer, script unsafe.Pointer, sourceURL unsafe.Pointer, ...) bool
- func JSClassCreate(definition *raw.JSClassDefinition) unsafe.Pointer
- func JSClassRelease(jsClass unsafe.Pointer)
- func JSClassRetain(jsClass unsafe.Pointer) unsafe.Pointer
- func JSContextGetGlobalContext(ctx unsafe.Pointer) unsafe.Pointer
- func JSContextGetGlobalObject(ctx unsafe.Pointer) unsafe.Pointer
- func JSContextGetGroup(ctx unsafe.Pointer) unsafe.Pointer
- func JSContextGroupCreate() unsafe.Pointer
- func JSContextGroupRelease(group unsafe.Pointer)
- func JSContextGroupRetain(group unsafe.Pointer) unsafe.Pointer
- func JSEvaluateScript(ctx unsafe.Pointer, script unsafe.Pointer, thisObject unsafe.Pointer, ...) unsafe.Pointer
- func JSGarbageCollect(ctx unsafe.Pointer)
- func JSGlobalContextCopyName(ctx unsafe.Pointer) unsafe.Pointer
- func JSGlobalContextCreate(globalObjectClass unsafe.Pointer) unsafe.Pointer
- func JSGlobalContextCreateInGroup(group unsafe.Pointer, globalObjectClass unsafe.Pointer) unsafe.Pointer
- func JSGlobalContextIsInspectable(ctx unsafe.Pointer) bool
- func JSGlobalContextRelease(ctx unsafe.Pointer)
- func JSGlobalContextRetain(ctx unsafe.Pointer) unsafe.Pointer
- func JSGlobalContextSetInspectable(ctx unsafe.Pointer, inspectable bool)
- func JSGlobalContextSetName(ctx unsafe.Pointer, name unsafe.Pointer)
- func JSObjectCallAsConstructor(ctx unsafe.Pointer, object unsafe.Pointer, argumentCount uint, ...) unsafe.Pointer
- func JSObjectCallAsFunction(ctx unsafe.Pointer, object unsafe.Pointer, thisObject unsafe.Pointer, ...) unsafe.Pointer
- func JSObjectCopyPropertyNames(ctx unsafe.Pointer, object unsafe.Pointer) unsafe.Pointer
- func JSObjectDeleteProperty(ctx unsafe.Pointer, object unsafe.Pointer, propertyName unsafe.Pointer, ...) bool
- func JSObjectDeletePropertyForKey(ctx unsafe.Pointer, object unsafe.Pointer, propertyKey unsafe.Pointer, ...) bool
- func JSObjectGetArrayBufferByteLength(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) uint
- func JSObjectGetArrayBufferBytesPtr(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
- func JSObjectGetPrivate(object unsafe.Pointer) unsafe.Pointer
- func JSObjectGetProperty(ctx unsafe.Pointer, object unsafe.Pointer, propertyName unsafe.Pointer, ...) unsafe.Pointer
- func JSObjectGetPropertyAtIndex(ctx unsafe.Pointer, object unsafe.Pointer, propertyIndex uint, ...) unsafe.Pointer
- func JSObjectGetPropertyForKey(ctx unsafe.Pointer, object unsafe.Pointer, propertyKey unsafe.Pointer, ...) unsafe.Pointer
- func JSObjectGetPrototype(ctx unsafe.Pointer, object unsafe.Pointer) unsafe.Pointer
- func JSObjectGetTypedArrayBuffer(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
- func JSObjectGetTypedArrayByteLength(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) uint
- func JSObjectGetTypedArrayByteOffset(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) uint
- func JSObjectGetTypedArrayBytesPtr(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
- func JSObjectGetTypedArrayLength(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) uint
- func JSObjectHasProperty(ctx unsafe.Pointer, object unsafe.Pointer, propertyName unsafe.Pointer) bool
- func JSObjectHasPropertyForKey(ctx unsafe.Pointer, object unsafe.Pointer, propertyKey unsafe.Pointer, ...) bool
- func JSObjectIsConstructor(ctx unsafe.Pointer, object unsafe.Pointer) bool
- func JSObjectIsFunction(ctx unsafe.Pointer, object unsafe.Pointer) bool
- func JSObjectMake(ctx unsafe.Pointer, jsClass unsafe.Pointer, data unsafe.Pointer) unsafe.Pointer
- func JSObjectMakeArray(ctx unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, ...) unsafe.Pointer
- func JSObjectMakeArrayBufferWithBytesNoCopy(ctx unsafe.Pointer, bytes_ unsafe.Pointer, byteLength uint, ...) unsafe.Pointer
- func JSObjectMakeConstructor(ctx unsafe.Pointer, jsClass unsafe.Pointer, callAsConstructor unsafe.Pointer) unsafe.Pointer
- func JSObjectMakeDate(ctx unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, ...) unsafe.Pointer
- func JSObjectMakeDeferredPromise(ctx unsafe.Pointer, resolve unsafe.Pointer, reject unsafe.Pointer, ...) unsafe.Pointer
- func JSObjectMakeError(ctx unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, ...) unsafe.Pointer
- func JSObjectMakeFunction(ctx unsafe.Pointer, name unsafe.Pointer, parameterCount uint, ...) unsafe.Pointer
- func JSObjectMakeFunctionWithCallback(ctx unsafe.Pointer, name unsafe.Pointer, callAsFunction unsafe.Pointer) unsafe.Pointer
- func JSObjectMakeRegExp(ctx unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, ...) unsafe.Pointer
- func JSObjectMakeTypedArray(ctx unsafe.Pointer, arrayType JSTypedArrayType, length uint, ...) unsafe.Pointer
- func JSObjectMakeTypedArrayWithArrayBuffer(ctx unsafe.Pointer, arrayType JSTypedArrayType, buffer unsafe.Pointer, ...) unsafe.Pointer
- func JSObjectMakeTypedArrayWithArrayBufferAndOffset(ctx unsafe.Pointer, arrayType JSTypedArrayType, buffer unsafe.Pointer, ...) unsafe.Pointer
- func JSObjectMakeTypedArrayWithBytesNoCopy(ctx unsafe.Pointer, arrayType JSTypedArrayType, bytes_ unsafe.Pointer, ...) unsafe.Pointer
- func JSObjectSetPrivate(object unsafe.Pointer, data unsafe.Pointer) bool
- func JSObjectSetProperty(ctx unsafe.Pointer, object unsafe.Pointer, propertyName unsafe.Pointer, ...)
- func JSObjectSetPropertyAtIndex(ctx unsafe.Pointer, object unsafe.Pointer, propertyIndex uint, ...)
- func JSObjectSetPropertyForKey(ctx unsafe.Pointer, object unsafe.Pointer, propertyKey unsafe.Pointer, ...)
- func JSObjectSetPrototype(ctx unsafe.Pointer, object unsafe.Pointer, value unsafe.Pointer)
- func JSPropertyNameAccumulatorAddName(accumulator unsafe.Pointer, propertyName unsafe.Pointer)
- func JSPropertyNameArrayGetCount(array unsafe.Pointer) uint
- func JSPropertyNameArrayGetNameAtIndex(array unsafe.Pointer, index uint) unsafe.Pointer
- func JSPropertyNameArrayRelease(array unsafe.Pointer)
- func JSPropertyNameArrayRetain(array unsafe.Pointer) unsafe.Pointer
- func JSStringCopyCFString(alloc unsafe.Pointer, string_ unsafe.Pointer) unsafe.Pointer
- func JSStringCreateWithCFString(string_ unsafe.Pointer) unsafe.Pointer
- func JSStringCreateWithCharacters(chars *uint16, numChars uint) unsafe.Pointer
- func JSStringCreateWithUTF8CString(string_ string) unsafe.Pointer
- func JSStringGetCharactersPtr(string_ unsafe.Pointer) *uint16
- func JSStringGetLength(string_ unsafe.Pointer) uint
- func JSStringGetMaximumUTF8CStringSize(string_ unsafe.Pointer) uint
- func JSStringGetUTF8CString(string_ unsafe.Pointer, buffer string, bufferSize uint) uint
- func JSStringIsEqual(a unsafe.Pointer, b unsafe.Pointer) bool
- func JSStringIsEqualToUTF8CString(a unsafe.Pointer, b string) bool
- func JSStringRelease(string_ unsafe.Pointer)
- func JSStringRetain(string_ unsafe.Pointer) unsafe.Pointer
- func JSValueCreateJSONString(ctx unsafe.Pointer, value unsafe.Pointer, indent uint, ...) unsafe.Pointer
- func JSValueIsArray(ctx unsafe.Pointer, value unsafe.Pointer) bool
- func JSValueIsBigInt(ctx unsafe.Pointer, value unsafe.Pointer) bool
- func JSValueIsBoolean(ctx unsafe.Pointer, value unsafe.Pointer) bool
- func JSValueIsDate(ctx unsafe.Pointer, value unsafe.Pointer) bool
- func JSValueIsEqual(ctx unsafe.Pointer, a unsafe.Pointer, b unsafe.Pointer, ...) bool
- func JSValueIsInstanceOfConstructor(ctx unsafe.Pointer, value unsafe.Pointer, constructor unsafe.Pointer, ...) bool
- func JSValueIsNull(ctx unsafe.Pointer, value unsafe.Pointer) bool
- func JSValueIsNumber(ctx unsafe.Pointer, value unsafe.Pointer) bool
- func JSValueIsObject(ctx unsafe.Pointer, value unsafe.Pointer) bool
- func JSValueIsObjectOfClass(ctx unsafe.Pointer, value unsafe.Pointer, jsClass unsafe.Pointer) bool
- func JSValueIsStrictEqual(ctx unsafe.Pointer, a unsafe.Pointer, b unsafe.Pointer) bool
- func JSValueIsString(ctx unsafe.Pointer, value unsafe.Pointer) bool
- func JSValueIsSymbol(ctx unsafe.Pointer, value unsafe.Pointer) bool
- func JSValueIsUndefined(ctx unsafe.Pointer, value unsafe.Pointer) bool
- func JSValueMakeBoolean(ctx unsafe.Pointer, boolean bool) unsafe.Pointer
- func JSValueMakeFromJSONString(ctx unsafe.Pointer, string_ unsafe.Pointer) unsafe.Pointer
- func JSValueMakeNull(ctx unsafe.Pointer) unsafe.Pointer
- func JSValueMakeNumber(ctx unsafe.Pointer, number float64) unsafe.Pointer
- func JSValueMakeString(ctx unsafe.Pointer, string_ unsafe.Pointer) unsafe.Pointer
- func JSValueMakeSymbol(ctx unsafe.Pointer, description unsafe.Pointer) unsafe.Pointer
- func JSValueMakeUndefined(ctx unsafe.Pointer) unsafe.Pointer
- func JSValueProtect(ctx unsafe.Pointer, value unsafe.Pointer)
- func JSValueToBoolean(ctx unsafe.Pointer, value unsafe.Pointer) bool
- func JSValueToInt32(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) int32
- func JSValueToInt64(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) int64
- func JSValueToNumber(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) float64
- func JSValueToObject(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
- func JSValueToStringCopy(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
- func JSValueToUInt32(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) uint32
- func JSValueToUInt64(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) uint64
- func JSValueUnprotect(ctx unsafe.Pointer, value unsafe.Pointer)
- type Context
- func (x *Context) EvaluateScript(script string) *Value
- func (x *Context) EvaluateScriptWithSourceURL(script string, sourceURL string) *Value
- func (x *Context) Exception() *Value
- func (x *Context) ExceptionHandler() objc.Block
- func (x *Context) GlobalObject() *Value
- func (x *Context) ID() objc.ID
- func (x *Context) IsInspectable() bool
- func (x *Context) JSGlobalContextRef() unsafe.Pointer
- func (x *Context) Name() string
- func (x *Context) ObjectForKeyedSubscript(key objc.ID) *Value
- func (x *Context) SetException(exception *raw.JSValue)
- func (x *Context) SetExceptionHandler(exceptionHandler func(*raw.JSContext, *raw.JSValue))
- func (x *Context) SetInspectable(inspectable bool)
- func (x *Context) SetName(name string)
- func (x *Context) SetObjectForKeyedSubscript(object objc.ID, key *foundation.NSObject)
- func (x *Context) Unwrap() *raw.JSContext
- func (x *Context) VirtualMachine() *VirtualMachine
- func (x *Context) WithException(exception *Value) *Context
- func (x *Context) WithExceptionHandler(exceptionHandler func(*raw.JSContext, *raw.JSValue)) *Context
- func (x *Context) WithInspectable(inspectable bool) *Context
- func (x *Context) WithName(name string) *Context
- type Contextable
- type JSRelationCondition
- func JSValueCompare(ctx unsafe.Pointer, left unsafe.Pointer, right unsafe.Pointer, ...) JSRelationCondition
- func JSValueCompareDouble(ctx unsafe.Pointer, left unsafe.Pointer, right float64, ...) JSRelationCondition
- func JSValueCompareInt64(ctx unsafe.Pointer, left unsafe.Pointer, right int64, exception unsafe.Pointer) JSRelationCondition
- func JSValueCompareUInt64(ctx unsafe.Pointer, left unsafe.Pointer, right uint64, ...) JSRelationCondition
- type JSType
- type JSTypedArrayType
- type ManagedValue
- type ManagedValueable
- type Value
- func CurrentCallee() *Value
- func CurrentThis() *Value
- func NewValue() *Value
- func ValueFromID(id objc.ID) *Value
- func ValueWithBoolInContext(value bool, context_ *raw.JSContext) *Value
- func ValueWithDoubleInContext(value float64, context_ *raw.JSContext) *Value
- func ValueWithInt32InContext(value int32, context_ *raw.JSContext) *Value
- func ValueWithJSValueRefInContext(value unsafe.Pointer, context_ *raw.JSContext) *Value
- func ValueWithNewArrayInContext(context_ *raw.JSContext) *Value
- func ValueWithNewBigIntFromDoubleInContext(value float64, context_ *raw.JSContext) *Value
- func ValueWithNewBigIntFromInt64InContext(int64 int64, context_ *raw.JSContext) *Value
- func ValueWithNewBigIntFromStringInContext(string_ string, context_ *raw.JSContext) *Value
- func ValueWithNewBigIntFromUInt64InContext(uint64 uint64, context_ *raw.JSContext) *Value
- func ValueWithNewErrorFromMessageInContext(message string, context_ *raw.JSContext) *Value
- func ValueWithNewObjectInContext(context_ *raw.JSContext) *Value
- func ValueWithNewPromiseInContextFromExecutor(context_ *raw.JSContext, callback func(*raw.JSValue, *raw.JSValue)) *Value
- func ValueWithNewPromiseRejectedWithReasonInContext(reason objc.ID, context_ *raw.JSContext) *Value
- func ValueWithNewPromiseResolvedWithResultInContext(result objc.ID, context_ *raw.JSContext) *Value
- func ValueWithNewRegularExpressionFromPatternFlagsInContext(pattern string, flags string, context_ *raw.JSContext) *Value
- func ValueWithNewSymbolFromDescriptionInContext(description string, context_ *raw.JSContext) *Value
- func ValueWithNullInContext(context_ *raw.JSContext) *Value
- func ValueWithObjectInContext(value objc.ID, context_ *raw.JSContext) *Value
- func ValueWithPointInContext(point corefoundation.CGPoint, context_ *raw.JSContext) *Value
- func ValueWithRangeInContext(range_ foundation.NSRange, context_ *raw.JSContext) *Value
- func ValueWithRectInContext(rect corefoundation.CGRect, context_ *raw.JSContext) *Value
- func ValueWithSizeInContext(size corefoundation.CGSize, context_ *raw.JSContext) *Value
- func ValueWithUInt32InContext(value uint32, context_ *raw.JSContext) *Value
- func ValueWithUndefinedInContext(context_ *raw.JSContext) *Value
- func (x *Value) CallWithArguments(arguments *foundation.NSArray[objc.ID]) *Value
- func (x *Value) CompareDouble(other float64) JSRelationCondition
- func (x *Value) CompareInt64(other int64) JSRelationCondition
- func (x *Value) CompareJSValue(other *raw.JSValue) JSRelationCondition
- func (x *Value) CompareUInt64(other uint64) JSRelationCondition
- func (x *Value) ConstructWithArguments(arguments *foundation.NSArray[objc.ID]) *Value
- func (x *Value) Context() *Context
- func (x *Value) DefinePropertyDescriptor(property objc.ID, descriptor objc.ID)
- func (x *Value) DeleteProperty(property objc.ID) bool
- func (x *Value) HasProperty(property objc.ID) bool
- func (x *Value) ID() objc.ID
- func (x *Value) InvokeMethodWithArguments(method string, arguments *foundation.NSArray[objc.ID]) *Value
- func (x *Value) IsArray() bool
- func (x *Value) IsBigInt() bool
- func (x *Value) IsBoolean() bool
- func (x *Value) IsDate() bool
- func (x *Value) IsEqualToObject(value objc.ID) bool
- func (x *Value) IsEqualWithTypeCoercionToObject(value objc.ID) bool
- func (x *Value) IsInstanceOf(value objc.ID) bool
- func (x *Value) IsNull() bool
- func (x *Value) IsNumber() bool
- func (x *Value) IsObject() bool
- func (x *Value) IsString() bool
- func (x *Value) IsSymbol() bool
- func (x *Value) IsUndefined() bool
- func (x *Value) JSValueRef() unsafe.Pointer
- func (x *Value) ObjectAtIndexedSubscript(index uint) *Value
- func (x *Value) ObjectForKeyedSubscript(key objc.ID) *Value
- func (x *Value) SetObjectAtIndexedSubscript(object objc.ID, index uint)
- func (x *Value) SetObjectForKeyedSubscript(object objc.ID, key objc.ID)
- func (x *Value) SetValueAtIndex(value objc.ID, index uint)
- func (x *Value) SetValueForProperty(value objc.ID, property objc.ID)
- func (x *Value) ToArray() *foundation.NSArray[objc.ID]
- func (x *Value) ToBool() bool
- func (x *Value) ToDate() *foundation.NSDate
- func (x *Value) ToDictionary() *foundation.NSDictionary[objc.ID, objc.ID]
- func (x *Value) ToDouble() float64
- func (x *Value) ToInt32() int32
- func (x *Value) ToInt64() int64
- func (x *Value) ToNumber() *foundation.NSNumber
- func (x *Value) ToObject() objc.ID
- func (x *Value) ToObjectOfClass(expectedClass objc.Class) objc.ID
- func (x *Value) ToPoint() corefoundation.CGPoint
- func (x *Value) ToRange() foundation.NSRange
- func (x *Value) ToRect() corefoundation.CGRect
- func (x *Value) ToSize() corefoundation.CGSize
- func (x *Value) ToString() string
- func (x *Value) ToUInt32() uint32
- func (x *Value) ToUInt64() uint64
- func (x *Value) Unwrap() *raw.JSValue
- func (x *Value) ValueAtIndex(index uint) *Value
- func (x *Value) ValueForProperty(property objc.ID) *Value
- type Valueable
- type VirtualMachine
- type VirtualMachineable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentArguments ¶
func CurrentArguments() *foundation.NSArray[objc.ID]
CurrentArguments calls the underlying JSContextCurrentArguments.
func JSBigIntCreateWithDouble ¶
func JSBigIntCreateWithDouble(ctx unsafe.Pointer, value float64, exception unsafe.Pointer) unsafe.Pointer
JSBigIntCreateWithDouble calls raw.JSBigIntCreateWithDouble (C function JSBigIntCreateWithDouble).
func JSBigIntCreateWithInt64 ¶
func JSBigIntCreateWithInt64(ctx unsafe.Pointer, integer int64, exception unsafe.Pointer) unsafe.Pointer
JSBigIntCreateWithInt64 calls raw.JSBigIntCreateWithInt64 (C function JSBigIntCreateWithInt64).
func JSBigIntCreateWithString ¶
func JSBigIntCreateWithString(ctx unsafe.Pointer, string_ unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSBigIntCreateWithString calls raw.JSBigIntCreateWithString (C function JSBigIntCreateWithString).
func JSBigIntCreateWithUInt64 ¶
func JSBigIntCreateWithUInt64(ctx unsafe.Pointer, integer uint64, exception unsafe.Pointer) unsafe.Pointer
JSBigIntCreateWithUInt64 calls raw.JSBigIntCreateWithUInt64 (C function JSBigIntCreateWithUInt64).
func JSCheckScriptSyntax ¶
func JSCheckScriptSyntax(ctx unsafe.Pointer, script unsafe.Pointer, sourceURL unsafe.Pointer, startingLineNumber int, exception unsafe.Pointer) bool
JSCheckScriptSyntax calls raw.JSCheckScriptSyntax (C function JSCheckScriptSyntax).
func JSClassCreate ¶
func JSClassCreate(definition *raw.JSClassDefinition) unsafe.Pointer
JSClassCreate calls raw.JSClassCreate (C function JSClassCreate).
func JSClassRelease ¶
JSClassRelease calls raw.JSClassRelease (C function JSClassRelease).
func JSClassRetain ¶
JSClassRetain calls raw.JSClassRetain (C function JSClassRetain).
func JSContextGetGlobalContext ¶
JSContextGetGlobalContext calls raw.JSContextGetGlobalContext (C function JSContextGetGlobalContext).
func JSContextGetGlobalObject ¶
JSContextGetGlobalObject calls raw.JSContextGetGlobalObject (C function JSContextGetGlobalObject).
func JSContextGetGroup ¶
JSContextGetGroup calls raw.JSContextGetGroup (C function JSContextGetGroup).
func JSContextGroupCreate ¶
JSContextGroupCreate calls raw.JSContextGroupCreate (C function JSContextGroupCreate).
func JSContextGroupRelease ¶
JSContextGroupRelease calls raw.JSContextGroupRelease (C function JSContextGroupRelease).
func JSContextGroupRetain ¶
JSContextGroupRetain calls raw.JSContextGroupRetain (C function JSContextGroupRetain).
func JSEvaluateScript ¶
func JSEvaluateScript(ctx unsafe.Pointer, script unsafe.Pointer, thisObject unsafe.Pointer, sourceURL unsafe.Pointer, startingLineNumber int, exception unsafe.Pointer) unsafe.Pointer
JSEvaluateScript calls raw.JSEvaluateScript (C function JSEvaluateScript).
func JSGarbageCollect ¶
JSGarbageCollect calls raw.JSGarbageCollect (C function JSGarbageCollect).
func JSGlobalContextCopyName ¶
JSGlobalContextCopyName calls raw.JSGlobalContextCopyName (C function JSGlobalContextCopyName).
func JSGlobalContextCreate ¶
JSGlobalContextCreate calls raw.JSGlobalContextCreate (C function JSGlobalContextCreate).
func JSGlobalContextCreateInGroup ¶
func JSGlobalContextCreateInGroup(group unsafe.Pointer, globalObjectClass unsafe.Pointer) unsafe.Pointer
JSGlobalContextCreateInGroup calls raw.JSGlobalContextCreateInGroup (C function JSGlobalContextCreateInGroup).
func JSGlobalContextIsInspectable ¶
JSGlobalContextIsInspectable calls raw.JSGlobalContextIsInspectable (C function JSGlobalContextIsInspectable).
func JSGlobalContextRelease ¶
JSGlobalContextRelease calls raw.JSGlobalContextRelease (C function JSGlobalContextRelease).
func JSGlobalContextRetain ¶
JSGlobalContextRetain calls raw.JSGlobalContextRetain (C function JSGlobalContextRetain).
func JSGlobalContextSetInspectable ¶
JSGlobalContextSetInspectable calls raw.JSGlobalContextSetInspectable (C function JSGlobalContextSetInspectable).
func JSGlobalContextSetName ¶
JSGlobalContextSetName calls raw.JSGlobalContextSetName (C function JSGlobalContextSetName).
func JSObjectCallAsConstructor ¶
func JSObjectCallAsConstructor(ctx unsafe.Pointer, object unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectCallAsConstructor calls raw.JSObjectCallAsConstructor (C function JSObjectCallAsConstructor).
func JSObjectCallAsFunction ¶
func JSObjectCallAsFunction(ctx unsafe.Pointer, object unsafe.Pointer, thisObject unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectCallAsFunction calls raw.JSObjectCallAsFunction (C function JSObjectCallAsFunction).
func JSObjectCopyPropertyNames ¶
JSObjectCopyPropertyNames calls raw.JSObjectCopyPropertyNames (C function JSObjectCopyPropertyNames).
func JSObjectDeleteProperty ¶
func JSObjectDeleteProperty(ctx unsafe.Pointer, object unsafe.Pointer, propertyName unsafe.Pointer, exception unsafe.Pointer) bool
JSObjectDeleteProperty calls raw.JSObjectDeleteProperty (C function JSObjectDeleteProperty).
func JSObjectDeletePropertyForKey ¶
func JSObjectDeletePropertyForKey(ctx unsafe.Pointer, object unsafe.Pointer, propertyKey unsafe.Pointer, exception unsafe.Pointer) bool
JSObjectDeletePropertyForKey calls raw.JSObjectDeletePropertyForKey (C function JSObjectDeletePropertyForKey).
func JSObjectGetArrayBufferByteLength ¶
func JSObjectGetArrayBufferByteLength(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) uint
JSObjectGetArrayBufferByteLength calls raw.JSObjectGetArrayBufferByteLength (C function JSObjectGetArrayBufferByteLength).
func JSObjectGetArrayBufferBytesPtr ¶
func JSObjectGetArrayBufferBytesPtr(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectGetArrayBufferBytesPtr calls raw.JSObjectGetArrayBufferBytesPtr (C function JSObjectGetArrayBufferBytesPtr).
func JSObjectGetPrivate ¶
JSObjectGetPrivate calls raw.JSObjectGetPrivate (C function JSObjectGetPrivate).
func JSObjectGetProperty ¶
func JSObjectGetProperty(ctx unsafe.Pointer, object unsafe.Pointer, propertyName unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectGetProperty calls raw.JSObjectGetProperty (C function JSObjectGetProperty).
func JSObjectGetPropertyAtIndex ¶
func JSObjectGetPropertyAtIndex(ctx unsafe.Pointer, object unsafe.Pointer, propertyIndex uint, exception unsafe.Pointer) unsafe.Pointer
JSObjectGetPropertyAtIndex calls raw.JSObjectGetPropertyAtIndex (C function JSObjectGetPropertyAtIndex).
func JSObjectGetPropertyForKey ¶
func JSObjectGetPropertyForKey(ctx unsafe.Pointer, object unsafe.Pointer, propertyKey unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectGetPropertyForKey calls raw.JSObjectGetPropertyForKey (C function JSObjectGetPropertyForKey).
func JSObjectGetPrototype ¶
JSObjectGetPrototype calls raw.JSObjectGetPrototype (C function JSObjectGetPrototype).
func JSObjectGetTypedArrayBuffer ¶
func JSObjectGetTypedArrayBuffer(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectGetTypedArrayBuffer calls raw.JSObjectGetTypedArrayBuffer (C function JSObjectGetTypedArrayBuffer).
func JSObjectGetTypedArrayByteLength ¶
func JSObjectGetTypedArrayByteLength(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) uint
JSObjectGetTypedArrayByteLength calls raw.JSObjectGetTypedArrayByteLength (C function JSObjectGetTypedArrayByteLength).
func JSObjectGetTypedArrayByteOffset ¶
func JSObjectGetTypedArrayByteOffset(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) uint
JSObjectGetTypedArrayByteOffset calls raw.JSObjectGetTypedArrayByteOffset (C function JSObjectGetTypedArrayByteOffset).
func JSObjectGetTypedArrayBytesPtr ¶
func JSObjectGetTypedArrayBytesPtr(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectGetTypedArrayBytesPtr calls raw.JSObjectGetTypedArrayBytesPtr (C function JSObjectGetTypedArrayBytesPtr).
func JSObjectGetTypedArrayLength ¶
func JSObjectGetTypedArrayLength(ctx unsafe.Pointer, object unsafe.Pointer, exception unsafe.Pointer) uint
JSObjectGetTypedArrayLength calls raw.JSObjectGetTypedArrayLength (C function JSObjectGetTypedArrayLength).
func JSObjectHasProperty ¶
func JSObjectHasProperty(ctx unsafe.Pointer, object unsafe.Pointer, propertyName unsafe.Pointer) bool
JSObjectHasProperty calls raw.JSObjectHasProperty (C function JSObjectHasProperty).
func JSObjectHasPropertyForKey ¶
func JSObjectHasPropertyForKey(ctx unsafe.Pointer, object unsafe.Pointer, propertyKey unsafe.Pointer, exception unsafe.Pointer) bool
JSObjectHasPropertyForKey calls raw.JSObjectHasPropertyForKey (C function JSObjectHasPropertyForKey).
func JSObjectIsConstructor ¶
JSObjectIsConstructor calls raw.JSObjectIsConstructor (C function JSObjectIsConstructor).
func JSObjectIsFunction ¶
JSObjectIsFunction calls raw.JSObjectIsFunction (C function JSObjectIsFunction).
func JSObjectMake ¶
JSObjectMake calls raw.JSObjectMake (C function JSObjectMake).
func JSObjectMakeArray ¶
func JSObjectMakeArray(ctx unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectMakeArray calls raw.JSObjectMakeArray (C function JSObjectMakeArray).
func JSObjectMakeArrayBufferWithBytesNoCopy ¶
func JSObjectMakeArrayBufferWithBytesNoCopy(ctx unsafe.Pointer, bytes_ unsafe.Pointer, byteLength uint, bytesDeallocator unsafe.Pointer, deallocatorContext unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectMakeArrayBufferWithBytesNoCopy calls raw.JSObjectMakeArrayBufferWithBytesNoCopy (C function JSObjectMakeArrayBufferWithBytesNoCopy).
func JSObjectMakeConstructor ¶
func JSObjectMakeConstructor(ctx unsafe.Pointer, jsClass unsafe.Pointer, callAsConstructor unsafe.Pointer) unsafe.Pointer
JSObjectMakeConstructor calls raw.JSObjectMakeConstructor (C function JSObjectMakeConstructor).
func JSObjectMakeDate ¶
func JSObjectMakeDate(ctx unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectMakeDate calls raw.JSObjectMakeDate (C function JSObjectMakeDate).
func JSObjectMakeDeferredPromise ¶
func JSObjectMakeDeferredPromise(ctx unsafe.Pointer, resolve unsafe.Pointer, reject unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectMakeDeferredPromise calls raw.JSObjectMakeDeferredPromise (C function JSObjectMakeDeferredPromise).
func JSObjectMakeError ¶
func JSObjectMakeError(ctx unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectMakeError calls raw.JSObjectMakeError (C function JSObjectMakeError).
func JSObjectMakeFunction ¶
func JSObjectMakeFunction(ctx unsafe.Pointer, name unsafe.Pointer, parameterCount uint, parameterNames unsafe.Pointer, body unsafe.Pointer, sourceURL unsafe.Pointer, startingLineNumber int, exception unsafe.Pointer) unsafe.Pointer
JSObjectMakeFunction calls raw.JSObjectMakeFunction (C function JSObjectMakeFunction).
func JSObjectMakeFunctionWithCallback ¶
func JSObjectMakeFunctionWithCallback(ctx unsafe.Pointer, name unsafe.Pointer, callAsFunction unsafe.Pointer) unsafe.Pointer
JSObjectMakeFunctionWithCallback calls raw.JSObjectMakeFunctionWithCallback (C function JSObjectMakeFunctionWithCallback).
func JSObjectMakeRegExp ¶
func JSObjectMakeRegExp(ctx unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectMakeRegExp calls raw.JSObjectMakeRegExp (C function JSObjectMakeRegExp).
func JSObjectMakeTypedArray ¶
func JSObjectMakeTypedArray(ctx unsafe.Pointer, arrayType JSTypedArrayType, length uint, exception unsafe.Pointer) unsafe.Pointer
JSObjectMakeTypedArray calls raw.JSObjectMakeTypedArray (C function JSObjectMakeTypedArray).
func JSObjectMakeTypedArrayWithArrayBuffer ¶
func JSObjectMakeTypedArrayWithArrayBuffer(ctx unsafe.Pointer, arrayType JSTypedArrayType, buffer unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectMakeTypedArrayWithArrayBuffer calls raw.JSObjectMakeTypedArrayWithArrayBuffer (C function JSObjectMakeTypedArrayWithArrayBuffer).
func JSObjectMakeTypedArrayWithArrayBufferAndOffset ¶
func JSObjectMakeTypedArrayWithArrayBufferAndOffset(ctx unsafe.Pointer, arrayType JSTypedArrayType, buffer unsafe.Pointer, byteOffset uint, length uint, exception unsafe.Pointer) unsafe.Pointer
JSObjectMakeTypedArrayWithArrayBufferAndOffset calls raw.JSObjectMakeTypedArrayWithArrayBufferAndOffset (C function JSObjectMakeTypedArrayWithArrayBufferAndOffset).
func JSObjectMakeTypedArrayWithBytesNoCopy ¶
func JSObjectMakeTypedArrayWithBytesNoCopy(ctx unsafe.Pointer, arrayType JSTypedArrayType, bytes_ unsafe.Pointer, byteLength uint, bytesDeallocator unsafe.Pointer, deallocatorContext unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSObjectMakeTypedArrayWithBytesNoCopy calls raw.JSObjectMakeTypedArrayWithBytesNoCopy (C function JSObjectMakeTypedArrayWithBytesNoCopy).
func JSObjectSetPrivate ¶
JSObjectSetPrivate calls raw.JSObjectSetPrivate (C function JSObjectSetPrivate).
func JSObjectSetProperty ¶
func JSObjectSetProperty(ctx unsafe.Pointer, object unsafe.Pointer, propertyName unsafe.Pointer, value unsafe.Pointer, attributes uint, exception unsafe.Pointer)
JSObjectSetProperty calls raw.JSObjectSetProperty (C function JSObjectSetProperty).
func JSObjectSetPropertyAtIndex ¶
func JSObjectSetPropertyAtIndex(ctx unsafe.Pointer, object unsafe.Pointer, propertyIndex uint, value unsafe.Pointer, exception unsafe.Pointer)
JSObjectSetPropertyAtIndex calls raw.JSObjectSetPropertyAtIndex (C function JSObjectSetPropertyAtIndex).
func JSObjectSetPropertyForKey ¶
func JSObjectSetPropertyForKey(ctx unsafe.Pointer, object unsafe.Pointer, propertyKey unsafe.Pointer, value unsafe.Pointer, attributes uint, exception unsafe.Pointer)
JSObjectSetPropertyForKey calls raw.JSObjectSetPropertyForKey (C function JSObjectSetPropertyForKey).
func JSObjectSetPrototype ¶
JSObjectSetPrototype calls raw.JSObjectSetPrototype (C function JSObjectSetPrototype).
func JSPropertyNameAccumulatorAddName ¶
JSPropertyNameAccumulatorAddName calls raw.JSPropertyNameAccumulatorAddName (C function JSPropertyNameAccumulatorAddName).
func JSPropertyNameArrayGetCount ¶
JSPropertyNameArrayGetCount calls raw.JSPropertyNameArrayGetCount (C function JSPropertyNameArrayGetCount).
func JSPropertyNameArrayGetNameAtIndex ¶
JSPropertyNameArrayGetNameAtIndex calls raw.JSPropertyNameArrayGetNameAtIndex (C function JSPropertyNameArrayGetNameAtIndex).
func JSPropertyNameArrayRelease ¶
JSPropertyNameArrayRelease calls raw.JSPropertyNameArrayRelease (C function JSPropertyNameArrayRelease).
func JSPropertyNameArrayRetain ¶
JSPropertyNameArrayRetain calls raw.JSPropertyNameArrayRetain (C function JSPropertyNameArrayRetain).
func JSStringCopyCFString ¶
JSStringCopyCFString calls raw.JSStringCopyCFString (C function JSStringCopyCFString).
func JSStringCreateWithCFString ¶
JSStringCreateWithCFString calls raw.JSStringCreateWithCFString (C function JSStringCreateWithCFString).
func JSStringCreateWithCharacters ¶
JSStringCreateWithCharacters calls raw.JSStringCreateWithCharacters (C function JSStringCreateWithCharacters).
func JSStringCreateWithUTF8CString ¶
JSStringCreateWithUTF8CString calls raw.JSStringCreateWithUTF8CString (C function JSStringCreateWithUTF8CString).
func JSStringGetCharactersPtr ¶
JSStringGetCharactersPtr calls raw.JSStringGetCharactersPtr (C function JSStringGetCharactersPtr).
func JSStringGetLength ¶
JSStringGetLength calls raw.JSStringGetLength (C function JSStringGetLength).
func JSStringGetMaximumUTF8CStringSize ¶
JSStringGetMaximumUTF8CStringSize calls raw.JSStringGetMaximumUTF8CStringSize (C function JSStringGetMaximumUTF8CStringSize).
func JSStringGetUTF8CString ¶
JSStringGetUTF8CString calls raw.JSStringGetUTF8CString (C function JSStringGetUTF8CString).
func JSStringIsEqual ¶
JSStringIsEqual calls raw.JSStringIsEqual (C function JSStringIsEqual).
func JSStringIsEqualToUTF8CString ¶
JSStringIsEqualToUTF8CString calls raw.JSStringIsEqualToUTF8CString (C function JSStringIsEqualToUTF8CString).
func JSStringRelease ¶
JSStringRelease calls raw.JSStringRelease (C function JSStringRelease).
func JSStringRetain ¶
JSStringRetain calls raw.JSStringRetain (C function JSStringRetain).
func JSValueCreateJSONString ¶
func JSValueCreateJSONString(ctx unsafe.Pointer, value unsafe.Pointer, indent uint, exception unsafe.Pointer) unsafe.Pointer
JSValueCreateJSONString calls raw.JSValueCreateJSONString (C function JSValueCreateJSONString).
func JSValueIsArray ¶
JSValueIsArray calls raw.JSValueIsArray (C function JSValueIsArray).
func JSValueIsBigInt ¶
JSValueIsBigInt calls raw.JSValueIsBigInt (C function JSValueIsBigInt).
func JSValueIsBoolean ¶
JSValueIsBoolean calls raw.JSValueIsBoolean (C function JSValueIsBoolean).
func JSValueIsDate ¶
JSValueIsDate calls raw.JSValueIsDate (C function JSValueIsDate).
func JSValueIsEqual ¶
func JSValueIsEqual(ctx unsafe.Pointer, a unsafe.Pointer, b unsafe.Pointer, exception unsafe.Pointer) bool
JSValueIsEqual calls raw.JSValueIsEqual (C function JSValueIsEqual).
func JSValueIsInstanceOfConstructor ¶
func JSValueIsInstanceOfConstructor(ctx unsafe.Pointer, value unsafe.Pointer, constructor unsafe.Pointer, exception unsafe.Pointer) bool
JSValueIsInstanceOfConstructor calls raw.JSValueIsInstanceOfConstructor (C function JSValueIsInstanceOfConstructor).
func JSValueIsNull ¶
JSValueIsNull calls raw.JSValueIsNull (C function JSValueIsNull).
func JSValueIsNumber ¶
JSValueIsNumber calls raw.JSValueIsNumber (C function JSValueIsNumber).
func JSValueIsObject ¶
JSValueIsObject calls raw.JSValueIsObject (C function JSValueIsObject).
func JSValueIsObjectOfClass ¶
JSValueIsObjectOfClass calls raw.JSValueIsObjectOfClass (C function JSValueIsObjectOfClass).
func JSValueIsStrictEqual ¶
JSValueIsStrictEqual calls raw.JSValueIsStrictEqual (C function JSValueIsStrictEqual).
func JSValueIsString ¶
JSValueIsString calls raw.JSValueIsString (C function JSValueIsString).
func JSValueIsSymbol ¶
JSValueIsSymbol calls raw.JSValueIsSymbol (C function JSValueIsSymbol).
func JSValueIsUndefined ¶
JSValueIsUndefined calls raw.JSValueIsUndefined (C function JSValueIsUndefined).
func JSValueMakeBoolean ¶
JSValueMakeBoolean calls raw.JSValueMakeBoolean (C function JSValueMakeBoolean).
func JSValueMakeFromJSONString ¶
JSValueMakeFromJSONString calls raw.JSValueMakeFromJSONString (C function JSValueMakeFromJSONString).
func JSValueMakeNull ¶
JSValueMakeNull calls raw.JSValueMakeNull (C function JSValueMakeNull).
func JSValueMakeNumber ¶
JSValueMakeNumber calls raw.JSValueMakeNumber (C function JSValueMakeNumber).
func JSValueMakeString ¶
JSValueMakeString calls raw.JSValueMakeString (C function JSValueMakeString).
func JSValueMakeSymbol ¶
JSValueMakeSymbol calls raw.JSValueMakeSymbol (C function JSValueMakeSymbol).
func JSValueMakeUndefined ¶
JSValueMakeUndefined calls raw.JSValueMakeUndefined (C function JSValueMakeUndefined).
func JSValueProtect ¶
JSValueProtect calls raw.JSValueProtect (C function JSValueProtect).
func JSValueToBoolean ¶
JSValueToBoolean calls raw.JSValueToBoolean (C function JSValueToBoolean).
func JSValueToInt32 ¶
JSValueToInt32 calls raw.JSValueToInt32 (C function JSValueToInt32).
func JSValueToInt64 ¶
JSValueToInt64 calls raw.JSValueToInt64 (C function JSValueToInt64).
func JSValueToNumber ¶
JSValueToNumber calls raw.JSValueToNumber (C function JSValueToNumber).
func JSValueToObject ¶
func JSValueToObject(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSValueToObject calls raw.JSValueToObject (C function JSValueToObject).
func JSValueToStringCopy ¶
func JSValueToStringCopy(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer
JSValueToStringCopy calls raw.JSValueToStringCopy (C function JSValueToStringCopy).
func JSValueToUInt32 ¶
JSValueToUInt32 calls raw.JSValueToUInt32 (C function JSValueToUInt32).
func JSValueToUInt64 ¶
JSValueToUInt64 calls raw.JSValueToUInt64 (C function JSValueToUInt64).
func JSValueUnprotect ¶
JSValueUnprotect calls raw.JSValueUnprotect (C function JSValueUnprotect).
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context wraps raw.JSContext with a fluent Go API.
func ContextFromID ¶
ContextFromID adopts an existing object pointer as a Context (nil for 0).
func ContextWithJSGlobalContextRef ¶
ContextWithJSGlobalContextRef calls the underlying JSContextContextWithJSGlobalContextRef.
func CurrentContext ¶
func CurrentContext() *Context
CurrentContext calls the underlying JSContextCurrentContext.
func NewContextWithVirtualMachine ¶
func NewContextWithVirtualMachine(virtualMachine *raw.JSVirtualMachine) *Context
NewContextWithVirtualMachine creates a new Context.
func (*Context) EvaluateScript ¶
EvaluateScript calls the underlying EvaluateScript.
func (*Context) EvaluateScriptWithSourceURL ¶
EvaluateScriptWithSourceURL calls the underlying EvaluateScriptWithSourceURL.
func (*Context) ExceptionHandler ¶
ExceptionHandler calls the underlying ExceptionHandler.
func (*Context) GlobalObject ¶
GlobalObject calls the underlying GlobalObject.
func (*Context) ID ¶
ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.
func (*Context) IsInspectable ¶
IsInspectable calls the underlying IsInspectable.
func (*Context) JSGlobalContextRef ¶
JSGlobalContextRef calls the underlying JSGlobalContextRef.
func (*Context) ObjectForKeyedSubscript ¶
ObjectForKeyedSubscript calls the underlying ObjectForKeyedSubscript.
func (*Context) SetException ¶
SetException calls the underlying SetException.
func (*Context) SetExceptionHandler ¶
SetExceptionHandler calls the underlying SetExceptionHandler.
func (*Context) SetInspectable ¶
SetInspectable calls the underlying SetInspectable.
func (*Context) SetObjectForKeyedSubscript ¶
func (x *Context) SetObjectForKeyedSubscript(object objc.ID, key *foundation.NSObject)
SetObjectForKeyedSubscript calls the underlying SetObjectForKeyedSubscript.
func (*Context) Unwrap ¶
Unwrap returns the underlying raw.JSContext.
func (*Context) VirtualMachine ¶
func (x *Context) VirtualMachine() *VirtualMachine
VirtualMachine calls the underlying VirtualMachine.
func (*Context) WithException ¶
WithException sets the exception property and returns the receiver for chaining.
func (*Context) WithExceptionHandler ¶
func (x *Context) WithExceptionHandler(exceptionHandler func(*raw.JSContext, *raw.JSValue)) *Context
WithExceptionHandler sets the exceptionHandler property and returns the receiver for chaining.
func (*Context) WithInspectable ¶
WithInspectable sets the inspectable property and returns the receiver for chaining.
type Contextable ¶
type Contextable interface {
Unwrap() *raw.JSContext
WithException(exception *Value) *Context
WithExceptionHandler(exceptionHandler func(*raw.JSContext, *raw.JSValue)) *Context
WithName(name string) *Context
WithInspectable(inspectable bool) *Context
EvaluateScript(script string) *Value
EvaluateScriptWithSourceURL(script string, sourceURL string) *Value
GlobalObject() *Value
Exception() *Value
SetException(exception *raw.JSValue)
ExceptionHandler() objc.Block
SetExceptionHandler(exceptionHandler func(*raw.JSContext, *raw.JSValue))
VirtualMachine() *VirtualMachine
Name() string
SetName(name string)
IsInspectable() bool
SetInspectable(inspectable bool)
ObjectForKeyedSubscript(key objc.ID) *Value
SetObjectForKeyedSubscript(object objc.ID, key *foundation.NSObject)
JSGlobalContextRef() unsafe.Pointer
}
Contextable is the interface implemented by Context, for mocking and DI.
type JSRelationCondition ¶ added in v0.5.0
type JSRelationCondition int64
const ( KJSRelationConditionUndefined JSRelationCondition = 0 KJSRelationConditionEqual JSRelationCondition = 1 KJSRelationConditionGreaterThan JSRelationCondition = 2 KJSRelationConditionLessThan JSRelationCondition = 3 )
func JSValueCompare ¶
func JSValueCompare(ctx unsafe.Pointer, left unsafe.Pointer, right unsafe.Pointer, exception unsafe.Pointer) JSRelationCondition
JSValueCompare calls raw.JSValueCompare (C function JSValueCompare).
func JSValueCompareDouble ¶
func JSValueCompareDouble(ctx unsafe.Pointer, left unsafe.Pointer, right float64, exception unsafe.Pointer) JSRelationCondition
JSValueCompareDouble calls raw.JSValueCompareDouble (C function JSValueCompareDouble).
func JSValueCompareInt64 ¶
func JSValueCompareInt64(ctx unsafe.Pointer, left unsafe.Pointer, right int64, exception unsafe.Pointer) JSRelationCondition
JSValueCompareInt64 calls raw.JSValueCompareInt64 (C function JSValueCompareInt64).
func JSValueCompareUInt64 ¶
func JSValueCompareUInt64(ctx unsafe.Pointer, left unsafe.Pointer, right uint64, exception unsafe.Pointer) JSRelationCondition
JSValueCompareUInt64 calls raw.JSValueCompareUInt64 (C function JSValueCompareUInt64).
func (JSRelationCondition) String ¶ added in v0.5.0
func (e JSRelationCondition) String() string
type JSType ¶ added in v0.5.0
type JSType int64
@enum JSType @abstract A constant identifying the type of a JSValue. @constant kJSTypeUndefined The unique undefined value. @constant kJSTypeNull The unique null value. @constant kJSTypeBoolean A primitive boolean value, one of true or false. @constant kJSTypeNumber A primitive number value. @constant kJSTypeString A primitive string value. @constant kJSTypeObject An object value (meaning that this JSValueRef is a JSObjectRef). @constant kJSTypeSymbol A primitive symbol value. @constant kJSTypeBigInt A primitive BigInt value.
func JSValueGetType ¶
JSValueGetType calls raw.JSValueGetType (C function JSValueGetType).
type JSTypedArrayType ¶ added in v0.5.0
type JSTypedArrayType int64
@enum JSTypedArrayType @abstract A constant identifying the Typed Array type of a JSObjectRef. @constant kJSTypedArrayTypeInt8Array Int8Array @constant kJSTypedArrayTypeInt16Array Int16Array @constant kJSTypedArrayTypeInt32Array Int32Array @constant kJSTypedArrayTypeUint8Array Uint8Array @constant kJSTypedArrayTypeUint8ClampedArray Uint8ClampedArray @constant kJSTypedArrayTypeUint16Array Uint16Array @constant kJSTypedArrayTypeUint32Array Uint32Array @constant kJSTypedArrayTypeFloat32Array Float32Array @constant kJSTypedArrayTypeFloat64Array Float64Array @constant kJSTypedArrayTypeBigInt64Array BigInt64Array @constant kJSTypedArrayTypeBigUint64Array BigUint64Array @constant kJSTypedArrayTypeArrayBuffer ArrayBuffer @constant kJSTypedArrayTypeNone Not a Typed Array
const ( KJSTypedArrayTypeInt8Array JSTypedArrayType = 0 KJSTypedArrayTypeInt16Array JSTypedArrayType = 1 KJSTypedArrayTypeInt32Array JSTypedArrayType = 2 KJSTypedArrayTypeUint8Array JSTypedArrayType = 3 KJSTypedArrayTypeUint8ClampedArray JSTypedArrayType = 4 KJSTypedArrayTypeUint16Array JSTypedArrayType = 5 KJSTypedArrayTypeUint32Array JSTypedArrayType = 6 KJSTypedArrayTypeFloat32Array JSTypedArrayType = 7 KJSTypedArrayTypeFloat64Array JSTypedArrayType = 8 KJSTypedArrayTypeArrayBuffer JSTypedArrayType = 9 KJSTypedArrayTypeNone JSTypedArrayType = 10 KJSTypedArrayTypeBigInt64Array JSTypedArrayType = 11 KJSTypedArrayTypeBigUint64Array JSTypedArrayType = 12 )
func JSValueGetTypedArrayType ¶
func JSValueGetTypedArrayType(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) JSTypedArrayType
JSValueGetTypedArrayType calls raw.JSValueGetTypedArrayType (C function JSValueGetTypedArrayType).
func (JSTypedArrayType) String ¶ added in v0.5.0
func (e JSTypedArrayType) String() string
type ManagedValue ¶
type ManagedValue struct {
// contains filtered or unexported fields
}
ManagedValue wraps raw.JSManagedValue with a fluent Go API.
func ManagedValueFromID ¶
func ManagedValueFromID(id objc.ID) *ManagedValue
ManagedValueFromID adopts an existing object pointer as a ManagedValue (nil for 0).
func ManagedValueWithValue ¶
func ManagedValueWithValue(value *raw.JSValue) *ManagedValue
ManagedValueWithValue calls the underlying JSManagedValueManagedValueWithValue.
func ManagedValueWithValueAndOwner ¶
func ManagedValueWithValueAndOwner(value *raw.JSValue, owner objc.ID) *ManagedValue
ManagedValueWithValueAndOwner calls the underlying JSManagedValueManagedValueWithValueAndOwner.
func NewManagedValueWithValue ¶
func NewManagedValueWithValue(value *raw.JSValue) *ManagedValue
NewManagedValueWithValue creates a new ManagedValue.
func (*ManagedValue) ID ¶
func (x *ManagedValue) ID() objc.ID
ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.
func (*ManagedValue) Unwrap ¶
func (x *ManagedValue) Unwrap() *raw.JSManagedValue
Unwrap returns the underlying raw.JSManagedValue.
func (*ManagedValue) Value ¶
func (x *ManagedValue) Value() *Value
Value calls the underlying Value.
type ManagedValueable ¶
type ManagedValueable interface {
Unwrap() *raw.JSManagedValue
Value() *Value
}
ManagedValueable is the interface implemented by ManagedValue, for mocking and DI.
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value wraps raw.JSValue with a fluent Go API.
func CurrentCallee ¶
func CurrentCallee() *Value
CurrentCallee calls the underlying JSContextCurrentCallee.
func ValueFromID ¶
ValueFromID adopts an existing object pointer as a Value (nil for 0).
func ValueWithBoolInContext ¶
ValueWithBoolInContext calls the underlying JSValueValueWithBoolInContext.
func ValueWithDoubleInContext ¶
ValueWithDoubleInContext calls the underlying JSValueValueWithDoubleInContext.
func ValueWithInt32InContext ¶
ValueWithInt32InContext calls the underlying JSValueValueWithInt32InContext.
func ValueWithJSValueRefInContext ¶
ValueWithJSValueRefInContext calls the underlying JSValueValueWithJSValueRefInContext.
func ValueWithNewArrayInContext ¶
ValueWithNewArrayInContext calls the underlying JSValueValueWithNewArrayInContext.
func ValueWithNewBigIntFromDoubleInContext ¶
ValueWithNewBigIntFromDoubleInContext calls the underlying JSValueValueWithNewBigIntFromDoubleInContext.
func ValueWithNewBigIntFromInt64InContext ¶
ValueWithNewBigIntFromInt64InContext calls the underlying JSValueValueWithNewBigIntFromInt64InContext.
func ValueWithNewBigIntFromStringInContext ¶
ValueWithNewBigIntFromStringInContext calls the underlying JSValueValueWithNewBigIntFromStringInContext.
func ValueWithNewBigIntFromUInt64InContext ¶
ValueWithNewBigIntFromUInt64InContext calls the underlying JSValueValueWithNewBigIntFromUInt64InContext.
func ValueWithNewErrorFromMessageInContext ¶
ValueWithNewErrorFromMessageInContext calls the underlying JSValueValueWithNewErrorFromMessageInContext.
func ValueWithNewObjectInContext ¶
ValueWithNewObjectInContext calls the underlying JSValueValueWithNewObjectInContext.
func ValueWithNewPromiseInContextFromExecutor ¶
func ValueWithNewPromiseInContextFromExecutor(context_ *raw.JSContext, callback func(*raw.JSValue, *raw.JSValue)) *Value
ValueWithNewPromiseInContextFromExecutor calls the underlying JSValueValueWithNewPromiseInContextFromExecutor.
func ValueWithNewPromiseRejectedWithReasonInContext ¶
ValueWithNewPromiseRejectedWithReasonInContext calls the underlying JSValueValueWithNewPromiseRejectedWithReasonInContext.
func ValueWithNewPromiseResolvedWithResultInContext ¶
ValueWithNewPromiseResolvedWithResultInContext calls the underlying JSValueValueWithNewPromiseResolvedWithResultInContext.
func ValueWithNewRegularExpressionFromPatternFlagsInContext ¶
func ValueWithNewRegularExpressionFromPatternFlagsInContext(pattern string, flags string, context_ *raw.JSContext) *Value
ValueWithNewRegularExpressionFromPatternFlagsInContext calls the underlying JSValueValueWithNewRegularExpressionFromPatternFlagsInContext.
func ValueWithNewSymbolFromDescriptionInContext ¶
ValueWithNewSymbolFromDescriptionInContext calls the underlying JSValueValueWithNewSymbolFromDescriptionInContext.
func ValueWithNullInContext ¶
ValueWithNullInContext calls the underlying JSValueValueWithNullInContext.
func ValueWithObjectInContext ¶
ValueWithObjectInContext calls the underlying JSValueValueWithObjectInContext.
func ValueWithPointInContext ¶
func ValueWithPointInContext(point corefoundation.CGPoint, context_ *raw.JSContext) *Value
ValueWithPointInContext calls the underlying JSValueValueWithPointInContext.
func ValueWithRangeInContext ¶
func ValueWithRangeInContext(range_ foundation.NSRange, context_ *raw.JSContext) *Value
ValueWithRangeInContext calls the underlying JSValueValueWithRangeInContext.
func ValueWithRectInContext ¶
func ValueWithRectInContext(rect corefoundation.CGRect, context_ *raw.JSContext) *Value
ValueWithRectInContext calls the underlying JSValueValueWithRectInContext.
func ValueWithSizeInContext ¶
func ValueWithSizeInContext(size corefoundation.CGSize, context_ *raw.JSContext) *Value
ValueWithSizeInContext calls the underlying JSValueValueWithSizeInContext.
func ValueWithUInt32InContext ¶
ValueWithUInt32InContext calls the underlying JSValueValueWithUInt32InContext.
func ValueWithUndefinedInContext ¶
ValueWithUndefinedInContext calls the underlying JSValueValueWithUndefinedInContext.
func (*Value) CallWithArguments ¶
CallWithArguments calls the underlying CallWithArguments.
func (*Value) CompareDouble ¶
func (x *Value) CompareDouble(other float64) JSRelationCondition
CompareDouble calls the underlying CompareDouble.
func (*Value) CompareInt64 ¶
func (x *Value) CompareInt64(other int64) JSRelationCondition
CompareInt64 calls the underlying CompareInt64.
func (*Value) CompareJSValue ¶
func (x *Value) CompareJSValue(other *raw.JSValue) JSRelationCondition
CompareJSValue calls the underlying CompareJSValue.
func (*Value) CompareUInt64 ¶
func (x *Value) CompareUInt64(other uint64) JSRelationCondition
CompareUInt64 calls the underlying CompareUInt64.
func (*Value) ConstructWithArguments ¶
ConstructWithArguments calls the underlying ConstructWithArguments.
func (*Value) DefinePropertyDescriptor ¶
DefinePropertyDescriptor calls the underlying DefinePropertyDescriptor.
func (*Value) DeleteProperty ¶
DeleteProperty calls the underlying DeleteProperty.
func (*Value) HasProperty ¶
HasProperty calls the underlying HasProperty.
func (*Value) ID ¶
ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.
func (*Value) InvokeMethodWithArguments ¶
func (x *Value) InvokeMethodWithArguments(method string, arguments *foundation.NSArray[objc.ID]) *Value
InvokeMethodWithArguments calls the underlying InvokeMethodWithArguments.
func (*Value) IsEqualToObject ¶
IsEqualToObject calls the underlying IsEqualToObject.
func (*Value) IsEqualWithTypeCoercionToObject ¶
IsEqualWithTypeCoercionToObject calls the underlying IsEqualWithTypeCoercionToObject.
func (*Value) IsInstanceOf ¶
IsInstanceOf calls the underlying IsInstanceOf.
func (*Value) IsUndefined ¶
IsUndefined calls the underlying IsUndefined.
func (*Value) JSValueRef ¶
JSValueRef calls the underlying JSValueRef.
func (*Value) ObjectAtIndexedSubscript ¶
ObjectAtIndexedSubscript calls the underlying ObjectAtIndexedSubscript.
func (*Value) ObjectForKeyedSubscript ¶
ObjectForKeyedSubscript calls the underlying ObjectForKeyedSubscript.
func (*Value) SetObjectAtIndexedSubscript ¶
SetObjectAtIndexedSubscript calls the underlying SetObjectAtIndexedSubscript.
func (*Value) SetObjectForKeyedSubscript ¶
SetObjectForKeyedSubscript calls the underlying SetObjectForKeyedSubscript.
func (*Value) SetValueAtIndex ¶
SetValueAtIndex calls the underlying SetValueAtIndex.
func (*Value) SetValueForProperty ¶
SetValueForProperty calls the underlying SetValueForProperty.
func (*Value) ToArray ¶
func (x *Value) ToArray() *foundation.NSArray[objc.ID]
ToArray calls the underlying ToArray.
func (*Value) ToDate ¶
func (x *Value) ToDate() *foundation.NSDate
ToDate calls the underlying ToDate.
func (*Value) ToDictionary ¶
func (x *Value) ToDictionary() *foundation.NSDictionary[objc.ID, objc.ID]
ToDictionary calls the underlying ToDictionary.
func (*Value) ToNumber ¶
func (x *Value) ToNumber() *foundation.NSNumber
ToNumber calls the underlying ToNumber.
func (*Value) ToObjectOfClass ¶
ToObjectOfClass calls the underlying ToObjectOfClass.
func (*Value) ToPoint ¶
func (x *Value) ToPoint() corefoundation.CGPoint
ToPoint calls the underlying ToPoint.
func (*Value) ToRange ¶
func (x *Value) ToRange() foundation.NSRange
ToRange calls the underlying ToRange.
func (*Value) ToRect ¶
func (x *Value) ToRect() corefoundation.CGRect
ToRect calls the underlying ToRect.
func (*Value) ToSize ¶
func (x *Value) ToSize() corefoundation.CGSize
ToSize calls the underlying ToSize.
func (*Value) Unwrap ¶
Unwrap returns the underlying raw.JSValue.
func (*Value) ValueAtIndex ¶
ValueAtIndex calls the underlying ValueAtIndex.
type Valueable ¶
type Valueable interface {
Unwrap() *raw.JSValue
ToObject() objc.ID
ToObjectOfClass(expectedClass objc.Class) objc.ID
ToBool() bool
ToDouble() float64
ToInt32() int32
ToUInt32() uint32
ToInt64() int64
ToUInt64() uint64
ToNumber() *foundation.NSNumber
ToString() string
ToDate() *foundation.NSDate
ToArray() *foundation.NSArray[objc.ID]
ToDictionary() *foundation.NSDictionary[objc.ID, objc.ID]
IsInstanceOf(value objc.ID) bool
IsEqualToObject(value objc.ID) bool
IsEqualWithTypeCoercionToObject(value objc.ID) bool
CompareJSValue(other *raw.JSValue) JSRelationCondition
CompareInt64(other int64) JSRelationCondition
CompareUInt64(other uint64) JSRelationCondition
CompareDouble(other float64) JSRelationCondition
CallWithArguments(arguments *foundation.NSArray[objc.ID]) *Value
ConstructWithArguments(arguments *foundation.NSArray[objc.ID]) *Value
InvokeMethodWithArguments(method string, arguments *foundation.NSArray[objc.ID]) *Value
Context() *Context
IsUndefined() bool
IsNull() bool
IsBoolean() bool
IsNumber() bool
IsString() bool
IsObject() bool
IsArray() bool
IsDate() bool
IsSymbol() bool
IsBigInt() bool
ToPoint() corefoundation.CGPoint
ToRange() foundation.NSRange
ToRect() corefoundation.CGRect
ToSize() corefoundation.CGSize
ValueForProperty(property objc.ID) *Value
SetValueForProperty(value objc.ID, property objc.ID)
DeleteProperty(property objc.ID) bool
HasProperty(property objc.ID) bool
DefinePropertyDescriptor(property objc.ID, descriptor objc.ID)
ValueAtIndex(index uint) *Value
SetValueAtIndex(value objc.ID, index uint)
ObjectForKeyedSubscript(key objc.ID) *Value
ObjectAtIndexedSubscript(index uint) *Value
SetObjectForKeyedSubscript(object objc.ID, key objc.ID)
SetObjectAtIndexedSubscript(object objc.ID, index uint)
JSValueRef() unsafe.Pointer
}
Valueable is the interface implemented by Value, for mocking and DI.
type VirtualMachine ¶
type VirtualMachine struct {
// contains filtered or unexported fields
}
VirtualMachine wraps raw.JSVirtualMachine with a fluent Go API.
func NewVirtualMachine ¶
func NewVirtualMachine() *VirtualMachine
NewVirtualMachine creates a new VirtualMachine.
func VirtualMachineFromID ¶
func VirtualMachineFromID(id objc.ID) *VirtualMachine
VirtualMachineFromID adopts an existing object pointer as a VirtualMachine (nil for 0).
func (*VirtualMachine) AddManagedReferenceWithOwner ¶
func (x *VirtualMachine) AddManagedReferenceWithOwner(object objc.ID, owner objc.ID)
AddManagedReferenceWithOwner calls the underlying AddManagedReferenceWithOwner.
func (*VirtualMachine) ID ¶
func (x *VirtualMachine) ID() objc.ID
ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.
func (*VirtualMachine) RemoveManagedReferenceWithOwner ¶
func (x *VirtualMachine) RemoveManagedReferenceWithOwner(object objc.ID, owner objc.ID)
RemoveManagedReferenceWithOwner calls the underlying RemoveManagedReferenceWithOwner.
func (*VirtualMachine) Unwrap ¶
func (x *VirtualMachine) Unwrap() *raw.JSVirtualMachine
Unwrap returns the underlying raw.JSVirtualMachine.
type VirtualMachineable ¶
type VirtualMachineable interface {
Unwrap() *raw.JSVirtualMachine
AddManagedReferenceWithOwner(object objc.ID, owner objc.ID)
RemoveManagedReferenceWithOwner(object objc.ID, owner objc.ID)
}
VirtualMachineable is the interface implemented by VirtualMachine, for mocking and DI.