javascriptcore

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package javascriptcore provides a fluent Go API over the macOS JavaScriptCore framework.

Index

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

func JSClassRelease(jsClass unsafe.Pointer)

JSClassRelease calls raw.JSClassRelease (C function JSClassRelease).

func JSClassRetain

func JSClassRetain(jsClass unsafe.Pointer) unsafe.Pointer

JSClassRetain calls raw.JSClassRetain (C function JSClassRetain).

func JSContextGetGlobalContext

func JSContextGetGlobalContext(ctx unsafe.Pointer) unsafe.Pointer

JSContextGetGlobalContext calls raw.JSContextGetGlobalContext (C function JSContextGetGlobalContext).

func JSContextGetGlobalObject

func JSContextGetGlobalObject(ctx unsafe.Pointer) unsafe.Pointer

JSContextGetGlobalObject calls raw.JSContextGetGlobalObject (C function JSContextGetGlobalObject).

func JSContextGetGroup

func JSContextGetGroup(ctx unsafe.Pointer) unsafe.Pointer

JSContextGetGroup calls raw.JSContextGetGroup (C function JSContextGetGroup).

func JSContextGroupCreate

func JSContextGroupCreate() unsafe.Pointer

JSContextGroupCreate calls raw.JSContextGroupCreate (C function JSContextGroupCreate).

func JSContextGroupRelease

func JSContextGroupRelease(group unsafe.Pointer)

JSContextGroupRelease calls raw.JSContextGroupRelease (C function JSContextGroupRelease).

func JSContextGroupRetain

func JSContextGroupRetain(group unsafe.Pointer) unsafe.Pointer

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

func JSGarbageCollect(ctx unsafe.Pointer)

JSGarbageCollect calls raw.JSGarbageCollect (C function JSGarbageCollect).

func JSGlobalContextCopyName

func JSGlobalContextCopyName(ctx unsafe.Pointer) unsafe.Pointer

JSGlobalContextCopyName calls raw.JSGlobalContextCopyName (C function JSGlobalContextCopyName).

func JSGlobalContextCreate

func JSGlobalContextCreate(globalObjectClass unsafe.Pointer) unsafe.Pointer

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

func JSGlobalContextIsInspectable(ctx unsafe.Pointer) bool

JSGlobalContextIsInspectable calls raw.JSGlobalContextIsInspectable (C function JSGlobalContextIsInspectable).

func JSGlobalContextRelease

func JSGlobalContextRelease(ctx unsafe.Pointer)

JSGlobalContextRelease calls raw.JSGlobalContextRelease (C function JSGlobalContextRelease).

func JSGlobalContextRetain

func JSGlobalContextRetain(ctx unsafe.Pointer) unsafe.Pointer

JSGlobalContextRetain calls raw.JSGlobalContextRetain (C function JSGlobalContextRetain).

func JSGlobalContextSetInspectable

func JSGlobalContextSetInspectable(ctx unsafe.Pointer, inspectable bool)

JSGlobalContextSetInspectable calls raw.JSGlobalContextSetInspectable (C function JSGlobalContextSetInspectable).

func JSGlobalContextSetName

func JSGlobalContextSetName(ctx unsafe.Pointer, name unsafe.Pointer)

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

func JSObjectCopyPropertyNames(ctx unsafe.Pointer, object unsafe.Pointer) unsafe.Pointer

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

func JSObjectGetPrivate(object unsafe.Pointer) unsafe.Pointer

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

func JSObjectGetPrototype(ctx unsafe.Pointer, object unsafe.Pointer) unsafe.Pointer

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

func JSObjectIsConstructor(ctx unsafe.Pointer, object unsafe.Pointer) bool

JSObjectIsConstructor calls raw.JSObjectIsConstructor (C function JSObjectIsConstructor).

func JSObjectIsFunction

func JSObjectIsFunction(ctx unsafe.Pointer, object unsafe.Pointer) bool

JSObjectIsFunction calls raw.JSObjectIsFunction (C function JSObjectIsFunction).

func JSObjectMake

func JSObjectMake(ctx unsafe.Pointer, jsClass unsafe.Pointer, data unsafe.Pointer) unsafe.Pointer

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 raw.JSTypedArrayType, length uint, exception unsafe.Pointer) unsafe.Pointer

JSObjectMakeTypedArray calls raw.JSObjectMakeTypedArray (C function JSObjectMakeTypedArray).

func JSObjectMakeTypedArrayWithArrayBuffer

func JSObjectMakeTypedArrayWithArrayBuffer(ctx unsafe.Pointer, arrayType raw.JSTypedArrayType, buffer unsafe.Pointer, exception unsafe.Pointer) unsafe.Pointer

JSObjectMakeTypedArrayWithArrayBuffer calls raw.JSObjectMakeTypedArrayWithArrayBuffer (C function JSObjectMakeTypedArrayWithArrayBuffer).

func JSObjectMakeTypedArrayWithArrayBufferAndOffset

func JSObjectMakeTypedArrayWithArrayBufferAndOffset(ctx unsafe.Pointer, arrayType raw.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 raw.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

func JSObjectSetPrivate(object unsafe.Pointer, data unsafe.Pointer) bool

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

func JSObjectSetPrototype(ctx unsafe.Pointer, object unsafe.Pointer, value unsafe.Pointer)

JSObjectSetPrototype calls raw.JSObjectSetPrototype (C function JSObjectSetPrototype).

func JSPropertyNameAccumulatorAddName

func JSPropertyNameAccumulatorAddName(accumulator unsafe.Pointer, propertyName unsafe.Pointer)

JSPropertyNameAccumulatorAddName calls raw.JSPropertyNameAccumulatorAddName (C function JSPropertyNameAccumulatorAddName).

func JSPropertyNameArrayGetCount

func JSPropertyNameArrayGetCount(array unsafe.Pointer) uint

JSPropertyNameArrayGetCount calls raw.JSPropertyNameArrayGetCount (C function JSPropertyNameArrayGetCount).

func JSPropertyNameArrayGetNameAtIndex

func JSPropertyNameArrayGetNameAtIndex(array unsafe.Pointer, index uint) unsafe.Pointer

JSPropertyNameArrayGetNameAtIndex calls raw.JSPropertyNameArrayGetNameAtIndex (C function JSPropertyNameArrayGetNameAtIndex).

func JSPropertyNameArrayRelease

func JSPropertyNameArrayRelease(array unsafe.Pointer)

JSPropertyNameArrayRelease calls raw.JSPropertyNameArrayRelease (C function JSPropertyNameArrayRelease).

func JSPropertyNameArrayRetain

func JSPropertyNameArrayRetain(array unsafe.Pointer) unsafe.Pointer

JSPropertyNameArrayRetain calls raw.JSPropertyNameArrayRetain (C function JSPropertyNameArrayRetain).

func JSStringCopyCFString

func JSStringCopyCFString(alloc unsafe.Pointer, string_ unsafe.Pointer) unsafe.Pointer

JSStringCopyCFString calls raw.JSStringCopyCFString (C function JSStringCopyCFString).

func JSStringCreateWithCFString

func JSStringCreateWithCFString(string_ unsafe.Pointer) unsafe.Pointer

JSStringCreateWithCFString calls raw.JSStringCreateWithCFString (C function JSStringCreateWithCFString).

func JSStringCreateWithCharacters

func JSStringCreateWithCharacters(chars *uint16, numChars uint) unsafe.Pointer

JSStringCreateWithCharacters calls raw.JSStringCreateWithCharacters (C function JSStringCreateWithCharacters).

func JSStringCreateWithUTF8CString

func JSStringCreateWithUTF8CString(string_ string) unsafe.Pointer

JSStringCreateWithUTF8CString calls raw.JSStringCreateWithUTF8CString (C function JSStringCreateWithUTF8CString).

func JSStringGetCharactersPtr

func JSStringGetCharactersPtr(string_ unsafe.Pointer) *uint16

JSStringGetCharactersPtr calls raw.JSStringGetCharactersPtr (C function JSStringGetCharactersPtr).

func JSStringGetLength

func JSStringGetLength(string_ unsafe.Pointer) uint

JSStringGetLength calls raw.JSStringGetLength (C function JSStringGetLength).

func JSStringGetMaximumUTF8CStringSize

func JSStringGetMaximumUTF8CStringSize(string_ unsafe.Pointer) uint

JSStringGetMaximumUTF8CStringSize calls raw.JSStringGetMaximumUTF8CStringSize (C function JSStringGetMaximumUTF8CStringSize).

func JSStringGetUTF8CString

func JSStringGetUTF8CString(string_ unsafe.Pointer, buffer string, bufferSize uint) uint

JSStringGetUTF8CString calls raw.JSStringGetUTF8CString (C function JSStringGetUTF8CString).

func JSStringIsEqual

func JSStringIsEqual(a unsafe.Pointer, b unsafe.Pointer) bool

JSStringIsEqual calls raw.JSStringIsEqual (C function JSStringIsEqual).

func JSStringIsEqualToUTF8CString

func JSStringIsEqualToUTF8CString(a unsafe.Pointer, b string) bool

JSStringIsEqualToUTF8CString calls raw.JSStringIsEqualToUTF8CString (C function JSStringIsEqualToUTF8CString).

func JSStringRelease

func JSStringRelease(string_ unsafe.Pointer)

JSStringRelease calls raw.JSStringRelease (C function JSStringRelease).

func JSStringRetain

func JSStringRetain(string_ unsafe.Pointer) unsafe.Pointer

JSStringRetain calls raw.JSStringRetain (C function JSStringRetain).

func JSValueCompare

func JSValueCompare(ctx unsafe.Pointer, left unsafe.Pointer, right unsafe.Pointer, exception unsafe.Pointer) raw.JSRelationCondition

JSValueCompare calls raw.JSValueCompare (C function JSValueCompare).

func JSValueCompareDouble

func JSValueCompareDouble(ctx unsafe.Pointer, left unsafe.Pointer, right float64, exception unsafe.Pointer) raw.JSRelationCondition

JSValueCompareDouble calls raw.JSValueCompareDouble (C function JSValueCompareDouble).

func JSValueCompareInt64

func JSValueCompareInt64(ctx unsafe.Pointer, left unsafe.Pointer, right int64, exception unsafe.Pointer) raw.JSRelationCondition

JSValueCompareInt64 calls raw.JSValueCompareInt64 (C function JSValueCompareInt64).

func JSValueCompareUInt64

func JSValueCompareUInt64(ctx unsafe.Pointer, left unsafe.Pointer, right uint64, exception unsafe.Pointer) raw.JSRelationCondition

JSValueCompareUInt64 calls raw.JSValueCompareUInt64 (C function JSValueCompareUInt64).

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 JSValueGetType

func JSValueGetType(ctx unsafe.Pointer, value unsafe.Pointer) raw.JSType

JSValueGetType calls raw.JSValueGetType (C function JSValueGetType).

func JSValueGetTypedArrayType

func JSValueGetTypedArrayType(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) raw.JSTypedArrayType

JSValueGetTypedArrayType calls raw.JSValueGetTypedArrayType (C function JSValueGetTypedArrayType).

func JSValueIsArray

func JSValueIsArray(ctx unsafe.Pointer, value unsafe.Pointer) bool

JSValueIsArray calls raw.JSValueIsArray (C function JSValueIsArray).

func JSValueIsBigInt

func JSValueIsBigInt(ctx unsafe.Pointer, value unsafe.Pointer) bool

JSValueIsBigInt calls raw.JSValueIsBigInt (C function JSValueIsBigInt).

func JSValueIsBoolean

func JSValueIsBoolean(ctx unsafe.Pointer, value unsafe.Pointer) bool

JSValueIsBoolean calls raw.JSValueIsBoolean (C function JSValueIsBoolean).

func JSValueIsDate

func JSValueIsDate(ctx unsafe.Pointer, value unsafe.Pointer) bool

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

func JSValueIsNull(ctx unsafe.Pointer, value unsafe.Pointer) bool

JSValueIsNull calls raw.JSValueIsNull (C function JSValueIsNull).

func JSValueIsNumber

func JSValueIsNumber(ctx unsafe.Pointer, value unsafe.Pointer) bool

JSValueIsNumber calls raw.JSValueIsNumber (C function JSValueIsNumber).

func JSValueIsObject

func JSValueIsObject(ctx unsafe.Pointer, value unsafe.Pointer) bool

JSValueIsObject calls raw.JSValueIsObject (C function JSValueIsObject).

func JSValueIsObjectOfClass

func JSValueIsObjectOfClass(ctx unsafe.Pointer, value unsafe.Pointer, jsClass unsafe.Pointer) bool

JSValueIsObjectOfClass calls raw.JSValueIsObjectOfClass (C function JSValueIsObjectOfClass).

func JSValueIsStrictEqual

func JSValueIsStrictEqual(ctx unsafe.Pointer, a unsafe.Pointer, b unsafe.Pointer) bool

JSValueIsStrictEqual calls raw.JSValueIsStrictEqual (C function JSValueIsStrictEqual).

func JSValueIsString

func JSValueIsString(ctx unsafe.Pointer, value unsafe.Pointer) bool

JSValueIsString calls raw.JSValueIsString (C function JSValueIsString).

func JSValueIsSymbol

func JSValueIsSymbol(ctx unsafe.Pointer, value unsafe.Pointer) bool

JSValueIsSymbol calls raw.JSValueIsSymbol (C function JSValueIsSymbol).

func JSValueIsUndefined

func JSValueIsUndefined(ctx unsafe.Pointer, value unsafe.Pointer) bool

JSValueIsUndefined calls raw.JSValueIsUndefined (C function JSValueIsUndefined).

func JSValueMakeBoolean

func JSValueMakeBoolean(ctx unsafe.Pointer, boolean bool) unsafe.Pointer

JSValueMakeBoolean calls raw.JSValueMakeBoolean (C function JSValueMakeBoolean).

func JSValueMakeFromJSONString

func JSValueMakeFromJSONString(ctx unsafe.Pointer, string_ unsafe.Pointer) unsafe.Pointer

JSValueMakeFromJSONString calls raw.JSValueMakeFromJSONString (C function JSValueMakeFromJSONString).

func JSValueMakeNull

func JSValueMakeNull(ctx unsafe.Pointer) unsafe.Pointer

JSValueMakeNull calls raw.JSValueMakeNull (C function JSValueMakeNull).

func JSValueMakeNumber

func JSValueMakeNumber(ctx unsafe.Pointer, number float64) unsafe.Pointer

JSValueMakeNumber calls raw.JSValueMakeNumber (C function JSValueMakeNumber).

func JSValueMakeString

func JSValueMakeString(ctx unsafe.Pointer, string_ unsafe.Pointer) unsafe.Pointer

JSValueMakeString calls raw.JSValueMakeString (C function JSValueMakeString).

func JSValueMakeSymbol

func JSValueMakeSymbol(ctx unsafe.Pointer, description unsafe.Pointer) unsafe.Pointer

JSValueMakeSymbol calls raw.JSValueMakeSymbol (C function JSValueMakeSymbol).

func JSValueMakeUndefined

func JSValueMakeUndefined(ctx unsafe.Pointer) unsafe.Pointer

JSValueMakeUndefined calls raw.JSValueMakeUndefined (C function JSValueMakeUndefined).

func JSValueProtect

func JSValueProtect(ctx unsafe.Pointer, value unsafe.Pointer)

JSValueProtect calls raw.JSValueProtect (C function JSValueProtect).

func JSValueToBoolean

func JSValueToBoolean(ctx unsafe.Pointer, value unsafe.Pointer) bool

JSValueToBoolean calls raw.JSValueToBoolean (C function JSValueToBoolean).

func JSValueToInt32

func JSValueToInt32(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) int32

JSValueToInt32 calls raw.JSValueToInt32 (C function JSValueToInt32).

func JSValueToInt64

func JSValueToInt64(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) int64

JSValueToInt64 calls raw.JSValueToInt64 (C function JSValueToInt64).

func JSValueToNumber

func JSValueToNumber(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) float64

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

func JSValueToUInt32(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) uint32

JSValueToUInt32 calls raw.JSValueToUInt32 (C function JSValueToUInt32).

func JSValueToUInt64

func JSValueToUInt64(ctx unsafe.Pointer, value unsafe.Pointer, exception unsafe.Pointer) uint64

JSValueToUInt64 calls raw.JSValueToUInt64 (C function JSValueToUInt64).

func JSValueUnprotect

func JSValueUnprotect(ctx unsafe.Pointer, value unsafe.Pointer)

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

func ContextFromID(id objc.ID) *Context

ContextFromID adopts an existing object pointer as a Context (nil for 0).

func ContextWithJSGlobalContextRef

func ContextWithJSGlobalContextRef(jsGlobalContextRef unsafe.Pointer) *Context

ContextWithJSGlobalContextRef calls the underlying JSContextContextWithJSGlobalContextRef.

func CurrentContext

func CurrentContext() *Context

CurrentContext calls the underlying JSContextCurrentContext.

func NewContext

func NewContext() *Context

NewContext creates a new Context.

func NewContextWithVirtualMachine

func NewContextWithVirtualMachine(virtualMachine *raw.JSVirtualMachine) *Context

NewContextWithVirtualMachine creates a new Context.

func (*Context) EvaluateScript

func (x *Context) EvaluateScript(script string) *Value

EvaluateScript calls the underlying EvaluateScript.

func (*Context) EvaluateScriptWithSourceURL

func (x *Context) EvaluateScriptWithSourceURL(script string, sourceURL string) *Value

EvaluateScriptWithSourceURL calls the underlying EvaluateScriptWithSourceURL.

func (*Context) Exception

func (x *Context) Exception() *Value

Exception calls the underlying Exception.

func (*Context) ExceptionHandler

func (x *Context) ExceptionHandler() objc.Block

ExceptionHandler calls the underlying ExceptionHandler.

func (*Context) GlobalObject

func (x *Context) GlobalObject() *Value

GlobalObject calls the underlying GlobalObject.

func (*Context) ID

func (x *Context) 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 (*Context) IsInspectable

func (x *Context) IsInspectable() bool

IsInspectable calls the underlying IsInspectable.

func (*Context) JSGlobalContextRef

func (x *Context) JSGlobalContextRef() unsafe.Pointer

JSGlobalContextRef calls the underlying JSGlobalContextRef.

func (*Context) Name

func (x *Context) Name() string

Name calls the underlying Name.

func (*Context) ObjectForKeyedSubscript

func (x *Context) ObjectForKeyedSubscript(key objc.ID) *Value

ObjectForKeyedSubscript calls the underlying ObjectForKeyedSubscript.

func (*Context) SetException

func (x *Context) SetException(exception *raw.JSValue)

SetException calls the underlying SetException.

func (*Context) SetExceptionHandler

func (x *Context) SetExceptionHandler(exceptionHandler func(*raw.JSContext, *raw.JSValue))

SetExceptionHandler calls the underlying SetExceptionHandler.

func (*Context) SetInspectable

func (x *Context) SetInspectable(inspectable bool)

SetInspectable calls the underlying SetInspectable.

func (*Context) SetName

func (x *Context) SetName(name string)

SetName calls the underlying SetName.

func (*Context) SetObjectForKeyedSubscript

func (x *Context) SetObjectForKeyedSubscript(object objc.ID, key *foundation.NSObject)

SetObjectForKeyedSubscript calls the underlying SetObjectForKeyedSubscript.

func (*Context) Unwrap

func (x *Context) Unwrap() *raw.JSContext

Unwrap returns the underlying raw.JSContext.

func (*Context) VirtualMachine

func (x *Context) VirtualMachine() *VirtualMachine

VirtualMachine calls the underlying VirtualMachine.

func (*Context) WithException

func (x *Context) WithException(exception *raw.JSValue) *Context

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

func (x *Context) WithInspectable(inspectable bool) *Context

WithInspectable sets the inspectable property and returns the receiver for chaining.

func (*Context) WithName

func (x *Context) WithName(name string) *Context

WithName sets the name property and returns the receiver for chaining.

type Contextable

type Contextable interface {
	Unwrap() *raw.JSContext
	WithException(exception *raw.JSValue) *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 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 CurrentThis

func CurrentThis() *Value

CurrentThis calls the underlying JSContextCurrentThis.

func NewValue

func NewValue() *Value

NewValue creates a new Value.

func ValueFromID

func ValueFromID(id objc.ID) *Value

ValueFromID adopts an existing object pointer as a Value (nil for 0).

func ValueWithBoolInContext

func ValueWithBoolInContext(value bool, context_ *raw.JSContext) *Value

ValueWithBoolInContext calls the underlying JSValueValueWithBoolInContext.

func ValueWithDoubleInContext

func ValueWithDoubleInContext(value float64, context_ *raw.JSContext) *Value

ValueWithDoubleInContext calls the underlying JSValueValueWithDoubleInContext.

func ValueWithInt32InContext

func ValueWithInt32InContext(value int32, context_ *raw.JSContext) *Value

ValueWithInt32InContext calls the underlying JSValueValueWithInt32InContext.

func ValueWithJSValueRefInContext

func ValueWithJSValueRefInContext(value unsafe.Pointer, context_ *raw.JSContext) *Value

ValueWithJSValueRefInContext calls the underlying JSValueValueWithJSValueRefInContext.

func ValueWithNewArrayInContext

func ValueWithNewArrayInContext(context_ *raw.JSContext) *Value

ValueWithNewArrayInContext calls the underlying JSValueValueWithNewArrayInContext.

func ValueWithNewBigIntFromDoubleInContext

func ValueWithNewBigIntFromDoubleInContext(value float64, context_ *raw.JSContext) *Value

ValueWithNewBigIntFromDoubleInContext calls the underlying JSValueValueWithNewBigIntFromDoubleInContext.

func ValueWithNewBigIntFromInt64InContext

func ValueWithNewBigIntFromInt64InContext(int64 int64, context_ *raw.JSContext) *Value

ValueWithNewBigIntFromInt64InContext calls the underlying JSValueValueWithNewBigIntFromInt64InContext.

func ValueWithNewBigIntFromStringInContext

func ValueWithNewBigIntFromStringInContext(string_ string, context_ *raw.JSContext) *Value

ValueWithNewBigIntFromStringInContext calls the underlying JSValueValueWithNewBigIntFromStringInContext.

func ValueWithNewBigIntFromUInt64InContext

func ValueWithNewBigIntFromUInt64InContext(uint64 uint64, context_ *raw.JSContext) *Value

ValueWithNewBigIntFromUInt64InContext calls the underlying JSValueValueWithNewBigIntFromUInt64InContext.

func ValueWithNewErrorFromMessageInContext

func ValueWithNewErrorFromMessageInContext(message string, context_ *raw.JSContext) *Value

ValueWithNewErrorFromMessageInContext calls the underlying JSValueValueWithNewErrorFromMessageInContext.

func ValueWithNewObjectInContext

func ValueWithNewObjectInContext(context_ *raw.JSContext) *Value

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

func ValueWithNewPromiseRejectedWithReasonInContext(reason objc.ID, context_ *raw.JSContext) *Value

ValueWithNewPromiseRejectedWithReasonInContext calls the underlying JSValueValueWithNewPromiseRejectedWithReasonInContext.

func ValueWithNewPromiseResolvedWithResultInContext

func ValueWithNewPromiseResolvedWithResultInContext(result objc.ID, context_ *raw.JSContext) *Value

ValueWithNewPromiseResolvedWithResultInContext calls the underlying JSValueValueWithNewPromiseResolvedWithResultInContext.

func ValueWithNewRegularExpressionFromPatternFlagsInContext

func ValueWithNewRegularExpressionFromPatternFlagsInContext(pattern string, flags string, context_ *raw.JSContext) *Value

ValueWithNewRegularExpressionFromPatternFlagsInContext calls the underlying JSValueValueWithNewRegularExpressionFromPatternFlagsInContext.

func ValueWithNewSymbolFromDescriptionInContext

func ValueWithNewSymbolFromDescriptionInContext(description string, context_ *raw.JSContext) *Value

ValueWithNewSymbolFromDescriptionInContext calls the underlying JSValueValueWithNewSymbolFromDescriptionInContext.

func ValueWithNullInContext

func ValueWithNullInContext(context_ *raw.JSContext) *Value

ValueWithNullInContext calls the underlying JSValueValueWithNullInContext.

func ValueWithObjectInContext

func ValueWithObjectInContext(value objc.ID, context_ *raw.JSContext) *Value

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

func ValueWithUInt32InContext(value uint32, context_ *raw.JSContext) *Value

ValueWithUInt32InContext calls the underlying JSValueValueWithUInt32InContext.

func ValueWithUndefinedInContext

func ValueWithUndefinedInContext(context_ *raw.JSContext) *Value

ValueWithUndefinedInContext calls the underlying JSValueValueWithUndefinedInContext.

func (*Value) CallWithArguments

func (x *Value) CallWithArguments(arguments *foundation.NSArray[objc.ID]) *Value

CallWithArguments calls the underlying CallWithArguments.

func (*Value) CompareDouble

func (x *Value) CompareDouble(other float64) raw.JSRelationCondition

CompareDouble calls the underlying CompareDouble.

func (*Value) CompareInt64

func (x *Value) CompareInt64(other int64) raw.JSRelationCondition

CompareInt64 calls the underlying CompareInt64.

func (*Value) CompareJSValue

func (x *Value) CompareJSValue(other *raw.JSValue) raw.JSRelationCondition

CompareJSValue calls the underlying CompareJSValue.

func (*Value) CompareUInt64

func (x *Value) CompareUInt64(other uint64) raw.JSRelationCondition

CompareUInt64 calls the underlying CompareUInt64.

func (*Value) ConstructWithArguments

func (x *Value) ConstructWithArguments(arguments *foundation.NSArray[objc.ID]) *Value

ConstructWithArguments calls the underlying ConstructWithArguments.

func (*Value) Context

func (x *Value) Context() *Context

Context calls the underlying Context.

func (*Value) DefinePropertyDescriptor

func (x *Value) DefinePropertyDescriptor(property objc.ID, descriptor objc.ID)

DefinePropertyDescriptor calls the underlying DefinePropertyDescriptor.

func (*Value) DeleteProperty

func (x *Value) DeleteProperty(property objc.ID) bool

DeleteProperty calls the underlying DeleteProperty.

func (*Value) HasProperty

func (x *Value) HasProperty(property objc.ID) bool

HasProperty calls the underlying HasProperty.

func (*Value) ID

func (x *Value) 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 (*Value) InvokeMethodWithArguments

func (x *Value) InvokeMethodWithArguments(method string, arguments *foundation.NSArray[objc.ID]) *Value

InvokeMethodWithArguments calls the underlying InvokeMethodWithArguments.

func (*Value) IsArray

func (x *Value) IsArray() bool

IsArray calls the underlying IsArray.

func (*Value) IsBigInt

func (x *Value) IsBigInt() bool

IsBigInt calls the underlying IsBigInt.

func (*Value) IsBoolean

func (x *Value) IsBoolean() bool

IsBoolean calls the underlying IsBoolean.

func (*Value) IsDate

func (x *Value) IsDate() bool

IsDate calls the underlying IsDate.

func (*Value) IsEqualToObject

func (x *Value) IsEqualToObject(value objc.ID) bool

IsEqualToObject calls the underlying IsEqualToObject.

func (*Value) IsEqualWithTypeCoercionToObject

func (x *Value) IsEqualWithTypeCoercionToObject(value objc.ID) bool

IsEqualWithTypeCoercionToObject calls the underlying IsEqualWithTypeCoercionToObject.

func (*Value) IsInstanceOf

func (x *Value) IsInstanceOf(value objc.ID) bool

IsInstanceOf calls the underlying IsInstanceOf.

func (*Value) IsNull

func (x *Value) IsNull() bool

IsNull calls the underlying IsNull.

func (*Value) IsNumber

func (x *Value) IsNumber() bool

IsNumber calls the underlying IsNumber.

func (*Value) IsObject

func (x *Value) IsObject() bool

IsObject calls the underlying IsObject.

func (*Value) IsString

func (x *Value) IsString() bool

IsString calls the underlying IsString.

func (*Value) IsSymbol

func (x *Value) IsSymbol() bool

IsSymbol calls the underlying IsSymbol.

func (*Value) IsUndefined

func (x *Value) IsUndefined() bool

IsUndefined calls the underlying IsUndefined.

func (*Value) JSValueRef

func (x *Value) JSValueRef() unsafe.Pointer

JSValueRef calls the underlying JSValueRef.

func (*Value) ObjectAtIndexedSubscript

func (x *Value) ObjectAtIndexedSubscript(index uint) *Value

ObjectAtIndexedSubscript calls the underlying ObjectAtIndexedSubscript.

func (*Value) ObjectForKeyedSubscript

func (x *Value) ObjectForKeyedSubscript(key objc.ID) *Value

ObjectForKeyedSubscript calls the underlying ObjectForKeyedSubscript.

func (*Value) SetObjectAtIndexedSubscript

func (x *Value) SetObjectAtIndexedSubscript(object objc.ID, index uint)

SetObjectAtIndexedSubscript calls the underlying SetObjectAtIndexedSubscript.

func (*Value) SetObjectForKeyedSubscript

func (x *Value) SetObjectForKeyedSubscript(object objc.ID, key objc.ID)

SetObjectForKeyedSubscript calls the underlying SetObjectForKeyedSubscript.

func (*Value) SetValueAtIndex

func (x *Value) SetValueAtIndex(value objc.ID, index uint)

SetValueAtIndex calls the underlying SetValueAtIndex.

func (*Value) SetValueForProperty

func (x *Value) SetValueForProperty(value objc.ID, property objc.ID)

SetValueForProperty calls the underlying SetValueForProperty.

func (*Value) ToArray

func (x *Value) ToArray() *foundation.NSArray[objc.ID]

ToArray calls the underlying ToArray.

func (*Value) ToBool

func (x *Value) ToBool() bool

ToBool calls the underlying ToBool.

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) ToDouble

func (x *Value) ToDouble() float64

ToDouble calls the underlying ToDouble.

func (*Value) ToInt32

func (x *Value) ToInt32() int32

ToInt32 calls the underlying ToInt32.

func (*Value) ToInt64

func (x *Value) ToInt64() int64

ToInt64 calls the underlying ToInt64.

func (*Value) ToNumber

func (x *Value) ToNumber() *foundation.NSNumber

ToNumber calls the underlying ToNumber.

func (*Value) ToObject

func (x *Value) ToObject() objc.ID

ToObject calls the underlying ToObject.

func (*Value) ToObjectOfClass

func (x *Value) ToObjectOfClass(expectedClass objc.Class) objc.ID

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) ToString

func (x *Value) ToString() string

ToString calls the underlying ToString.

func (*Value) ToUInt32

func (x *Value) ToUInt32() uint32

ToUInt32 calls the underlying ToUInt32.

func (*Value) ToUInt64

func (x *Value) ToUInt64() uint64

ToUInt64 calls the underlying ToUInt64.

func (*Value) Unwrap

func (x *Value) Unwrap() *raw.JSValue

Unwrap returns the underlying raw.JSValue.

func (*Value) ValueAtIndex

func (x *Value) ValueAtIndex(index uint) *Value

ValueAtIndex calls the underlying ValueAtIndex.

func (*Value) ValueForProperty

func (x *Value) ValueForProperty(property objc.ID) *Value

ValueForProperty calls the underlying ValueForProperty.

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) raw.JSRelationCondition
	CompareInt64(other int64) raw.JSRelationCondition
	CompareUInt64(other uint64) raw.JSRelationCondition
	CompareDouble(other float64) raw.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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL