JsiRuntime
Kind: class
EXPERIMENTAL
An experimental API. Do not use it directly. It may be removed or changed in a future version. 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
EXPERIMENTAL
Global
readonly
JsiObjectRef
Global
EXPERIMENTAL
IsInspectable
readonly
bool IsInspectable
EXPERIMENTAL
Methods
Call
JsiValueRef
Call
(JsiObjectRef
func, JsiValueRef
thisArg, JsiValueRef
args)
EXPERIMENTAL
CallAsConstructor
JsiValueRef
CallAsConstructor
(JsiObjectRef
func, JsiValueRef
args)
EXPERIMENTAL
CloneObject
JsiObjectRef
CloneObject
(JsiObjectRef
obj)
EXPERIMENTAL
ClonePropertyId
JsiPropertyIdRef
ClonePropertyId
(JsiPropertyIdRef
propertyId)
EXPERIMENTAL
CloneString
JsiStringRef
CloneString
(JsiStringRef
str)
EXPERIMENTAL
CloneSymbol
JsiSymbolRef
CloneSymbol
(JsiSymbolRef
symbol)
EXPERIMENTAL
CreateArray
JsiObjectRef
CreateArray
(uint32_t size)
EXPERIMENTAL
CreateFunctionFromHostFunction
JsiObjectRef
CreateFunctionFromHostFunction
(JsiPropertyIdRef
funcName, uint32_t paramCount, JsiHostFunction
hostFunc)
EXPERIMENTAL
CreateObject
JsiObjectRef
CreateObject
()
EXPERIMENTAL
CreateObjectWithHostObject
JsiObjectRef
CreateObjectWithHostObject
(IJsiHostObject
hostObject)
EXPERIMENTAL
CreatePropertyId
JsiPropertyIdRef
CreatePropertyId
(string name)
EXPERIMENTAL
CreatePropertyIdFromAscii
JsiPropertyIdRef
CreatePropertyIdFromAscii
(uint8_t ascii)
EXPERIMENTAL
CreatePropertyIdFromString
JsiPropertyIdRef
CreatePropertyIdFromString
(JsiStringRef
str)
EXPERIMENTAL
CreatePropertyIdFromUtf8
JsiPropertyIdRef
CreatePropertyIdFromUtf8
(uint8_t utf8)
EXPERIMENTAL
CreateString
JsiStringRef
CreateString
(string value)
EXPERIMENTAL
CreateStringFromAscii
JsiStringRef
CreateStringFromAscii
(uint8_t ascii)
EXPERIMENTAL
CreateStringFromUtf8
JsiStringRef
CreateStringFromUtf8
(uint8_t utf8)
EXPERIMENTAL
CreateValueFromJson
JsiValueRef
CreateValueFromJson
(string json)
EXPERIMENTAL
CreateValueFromJsonUtf8
JsiValueRef
CreateValueFromJsonUtf8
(uint8_t json)
EXPERIMENTAL
CreateWeakObject
JsiWeakObjectRef
CreateWeakObject
(JsiObjectRef
obj)
EXPERIMENTAL
DrainMicrotasks
bool DrainMicrotasks
(int maxMicrotasksHint)
EXPERIMENTAL
EvaluateJavaScript
JsiValueRef
EvaluateJavaScript
(IJsiByteBuffer
buffer, string sourceUrl)
EXPERIMENTAL
EvaluatePreparedJavaScript
JsiValueRef
EvaluatePreparedJavaScript
(JsiPreparedJavaScript
js)
EXPERIMENTAL
GetAndClearError
JsiError
GetAndClearError
()
EXPERIMENTAL
GetArrayBufferData
void GetArrayBufferData
(JsiObjectRef
arrayBuffer, JsiByteArrayUser
useArrayBytes)
EXPERIMENTAL
GetArrayBufferSize
uint32_t GetArrayBufferSize
(JsiObjectRef
arrayBuffer)
EXPERIMENTAL
GetArraySize
uint32_t GetArraySize
(JsiObjectRef
arr)
EXPERIMENTAL
GetHostFunction
JsiHostFunction
GetHostFunction
(JsiObjectRef
func)
EXPERIMENTAL
GetHostObject
IJsiHostObject
GetHostObject
(JsiObjectRef
obj)
EXPERIMENTAL
GetProperty
JsiValueRef
GetProperty
(JsiObjectRef
obj, JsiPropertyIdRef
propertyId)
EXPERIMENTAL
GetPropertyIdArray
JsiObjectRef
GetPropertyIdArray
(JsiObjectRef
obj)
EXPERIMENTAL
GetValueAtIndex
JsiValueRef
GetValueAtIndex
(JsiObjectRef
arr, uint32_t index)
EXPERIMENTAL
HasProperty
bool HasProperty
(JsiObjectRef
obj, JsiPropertyIdRef
propertyId)
EXPERIMENTAL
InstanceOf
bool InstanceOf
(JsiObjectRef
obj, JsiObjectRef
constructor)
EXPERIMENTAL
IsArray
bool IsArray
(JsiObjectRef
obj)
EXPERIMENTAL
IsArrayBuffer
bool IsArrayBuffer
(JsiObjectRef
obj)
EXPERIMENTAL
IsFunction
bool IsFunction
(JsiObjectRef
obj)
EXPERIMENTAL
IsHostFunction
bool IsHostFunction
(JsiObjectRef
obj)
EXPERIMENTAL
IsHostObject
bool IsHostObject
(JsiObjectRef
obj)
EXPERIMENTAL
LockWeakObject
JsiValueRef
LockWeakObject
(JsiWeakObjectRef
weakObject)
EXPERIMENTAL
MakeChakraRuntime
static
JsiRuntime
MakeChakraRuntime
()
EXPERIMENTAL
ObjectStrictEquals
bool ObjectStrictEquals
(JsiObjectRef
left, JsiObjectRef
right)
EXPERIMENTAL
PopScope
void PopScope
(JsiScopeState
scopeState)
EXPERIMENTAL
PrepareJavaScript
JsiPreparedJavaScript
PrepareJavaScript
(IJsiByteBuffer
buffer, string sourceUrl)
EXPERIMENTAL
PropertyIdEquals
bool PropertyIdEquals
(JsiPropertyIdRef
left, JsiPropertyIdRef
right)
EXPERIMENTAL
PropertyIdToString
string PropertyIdToString
(JsiPropertyIdRef
propertyId)
EXPERIMENTAL
PropertyIdToUtf8
void PropertyIdToUtf8
(JsiPropertyIdRef
propertyId, JsiByteArrayUser
useUtf8String)
EXPERIMENTAL
PushScope
JsiScopeState
PushScope
()
EXPERIMENTAL
ReleaseObject
void ReleaseObject
(JsiObjectRef
obj)
EXPERIMENTAL
ReleasePropertyId
void ReleasePropertyId
(JsiPropertyIdRef
propertyId)
EXPERIMENTAL
ReleaseString
void ReleaseString
(JsiStringRef
str)
EXPERIMENTAL
ReleaseSymbol
void ReleaseSymbol
(JsiSymbolRef
symbol)
EXPERIMENTAL
SetError
void SetError
(JsiErrorType
errorType, string errorDetails, JsiValueRef
value)
EXPERIMENTAL
SetProperty
void SetProperty
(JsiObjectRef
obj, JsiPropertyIdRef
propertyId, JsiValueRef
value)
EXPERIMENTAL
SetValueAtIndex
void SetValueAtIndex
(JsiObjectRef
arr, uint32_t index, JsiValueRef
value)
EXPERIMENTAL
StringStrictEquals
bool StringStrictEquals
(JsiStringRef
left, JsiStringRef
right)
EXPERIMENTAL
StringToString
string StringToString
(JsiStringRef
str)
EXPERIMENTAL
StringToUtf8
void StringToUtf8
(JsiStringRef
str, JsiByteArrayUser
useUtf8String)
EXPERIMENTAL
SymbolStrictEquals
bool SymbolStrictEquals
(JsiSymbolRef
left, JsiSymbolRef
right)
EXPERIMENTAL
SymbolToString
string SymbolToString
(JsiSymbolRef
symbol)
EXPERIMENTAL
SymbolToUtf8
void SymbolToUtf8
(JsiSymbolRef
symbol, JsiByteArrayUser
useUtf8String)
EXPERIMENTAL