JsiRuntime
Kind: class
EXPERIMENTAL
An experimental API. Do not use it directly. It may be removed or changed in 0.65. Instead, use the JSI API that uses this API internally.
See the ExecuteJsi
method in JsiApiContext.h
of the Microsoft.ReactNative.Cxx
shared project, or the examples of the JSI-based TurboModules in the Microsoft.ReactNative.IntegrationTests
project.
Note that the JSI is defined only for C++ code. We plan to add the .Net support in future.
Properties
Description
readonly
string Description
Global
readonly
JsiObjectRef
Global
IsInspectable
readonly
bool IsInspectable
Methods
Call
JsiValueRef
Call
(JsiObjectRef
func, JsiValueRef
thisArg, JsiValueRef
args)
CallAsConstructor
JsiValueRef
CallAsConstructor
(JsiObjectRef
func, JsiValueRef
args)
CloneObject
JsiObjectRef
CloneObject
(JsiObjectRef
obj)
ClonePropertyId
JsiPropertyIdRef
ClonePropertyId
(JsiPropertyIdRef
propertyId)
CloneString
JsiStringRef
CloneString
(JsiStringRef
str)
CloneSymbol
JsiSymbolRef
CloneSymbol
(JsiSymbolRef
symbol)
CreateArray
JsiObjectRef
CreateArray
(uint32_t size)
CreateFunctionFromHostFunction
JsiObjectRef
CreateFunctionFromHostFunction
(JsiPropertyIdRef
funcName, uint32_t paramCount, JsiHostFunction
hostFunc)
CreateObject
JsiObjectRef
CreateObject
()
CreateObjectWithHostObject
JsiObjectRef
CreateObjectWithHostObject
(IJsiHostObject
hostObject)
CreatePropertyId
JsiPropertyIdRef
CreatePropertyId
(string name)
CreatePropertyIdFromAscii
JsiPropertyIdRef
CreatePropertyIdFromAscii
(uint8_t ascii)
CreatePropertyIdFromString
JsiPropertyIdRef
CreatePropertyIdFromString
(JsiStringRef
str)
CreatePropertyIdFromUtf8
JsiPropertyIdRef
CreatePropertyIdFromUtf8
(uint8_t utf8)
CreateString
JsiStringRef
CreateString
(string value)
CreateStringFromAscii
JsiStringRef
CreateStringFromAscii
(uint8_t ascii)
CreateStringFromUtf8
JsiStringRef
CreateStringFromUtf8
(uint8_t utf8)
CreateValueFromJson
JsiValueRef
CreateValueFromJson
(string json)
CreateValueFromJsonUtf8
JsiValueRef
CreateValueFromJsonUtf8
(uint8_t json)
CreateWeakObject
JsiWeakObjectRef
CreateWeakObject
(JsiObjectRef
obj)
EvaluateJavaScript
JsiValueRef
EvaluateJavaScript
(IJsiByteBuffer
buffer, string sourceUrl)
EvaluatePreparedJavaScript
JsiValueRef
EvaluatePreparedJavaScript
(JsiPreparedJavaScript
js)
GetAndClearError
JsiError
GetAndClearError
()
GetArrayBufferData
void GetArrayBufferData
(JsiObjectRef
arrayBuffer, JsiByteArrayUser
useArrayBytes)
GetArrayBufferSize
uint32_t GetArrayBufferSize
(JsiObjectRef
arrayBuffer)
GetArraySize
uint32_t GetArraySize
(JsiObjectRef
arr)
GetHostFunction
JsiHostFunction
GetHostFunction
(JsiObjectRef
func)
GetHostObject
IJsiHostObject
GetHostObject
(JsiObjectRef
obj)
GetProperty
JsiValueRef
GetProperty
(JsiObjectRef
obj, JsiPropertyIdRef
propertyId)
GetPropertyIdArray
JsiObjectRef
GetPropertyIdArray
(JsiObjectRef
obj)
GetValueAtIndex
JsiValueRef
GetValueAtIndex
(JsiObjectRef
arr, uint32_t index)
HasProperty
bool HasProperty
(JsiObjectRef
obj, JsiPropertyIdRef
propertyId)
InstanceOf
bool InstanceOf
(JsiObjectRef
obj, JsiObjectRef
constructor)
IsArray
bool IsArray
(JsiObjectRef
obj)
IsArrayBuffer
bool IsArrayBuffer
(JsiObjectRef
obj)
IsFunction
bool IsFunction
(JsiObjectRef
obj)
IsHostFunction
bool IsHostFunction
(JsiObjectRef
obj)
IsHostObject
bool IsHostObject
(JsiObjectRef
obj)
LockWeakObject
JsiValueRef
LockWeakObject
(JsiWeakObjectRef
weakObject)
MakeChakraRuntime
static
JsiRuntime
MakeChakraRuntime
()
ObjectStrictEquals
bool ObjectStrictEquals
(JsiObjectRef
left, JsiObjectRef
right)
PopScope
void PopScope
(JsiScopeState
scopeState)
PrepareJavaScript
JsiPreparedJavaScript
PrepareJavaScript
(IJsiByteBuffer
buffer, string sourceUrl)
PropertyIdEquals
bool PropertyIdEquals
(JsiPropertyIdRef
left, JsiPropertyIdRef
right)
PropertyIdToString
string PropertyIdToString
(JsiPropertyIdRef
propertyId)
PropertyIdToUtf8
void PropertyIdToUtf8
(JsiPropertyIdRef
propertyId, JsiByteArrayUser
useUtf8String)
PushScope
JsiScopeState
PushScope
()
ReleaseObject
void ReleaseObject
(JsiObjectRef
obj)
ReleasePropertyId
void ReleasePropertyId
(JsiPropertyIdRef
propertyId)
ReleaseString
void ReleaseString
(JsiStringRef
str)
ReleaseSymbol
void ReleaseSymbol
(JsiSymbolRef
symbol)
SetError
void SetError
(JsiErrorType
errorType, string errorDetails, JsiValueRef
value)
SetProperty
void SetProperty
(JsiObjectRef
obj, JsiPropertyIdRef
propertyId, JsiValueRef
value)
SetValueAtIndex
void SetValueAtIndex
(JsiObjectRef
arr, uint32_t index, JsiValueRef
value)
StringStrictEquals
bool StringStrictEquals
(JsiStringRef
left, JsiStringRef
right)
StringToString
string StringToString
(JsiStringRef
str)
StringToUtf8
void StringToUtf8
(JsiStringRef
str, JsiByteArrayUser
useUtf8String)
SymbolStrictEquals
bool SymbolStrictEquals
(JsiSymbolRef
left, JsiSymbolRef
right)
SymbolToString
string SymbolToString
(JsiSymbolRef
symbol)
SymbolToUtf8
void SymbolToUtf8
(JsiSymbolRef
symbol, JsiByteArrayUser
useUtf8String)