internal static extern JsErrorCode JsSetException(JsValue exception);
internal static extern JsErrorCode JsGetSymbolFromPropertyId(JsPropertyId propertyId, out JsValue symbol);
internal static extern JsErrorCode JsGetUndefinedValue(out JsValue undefinedValue);
internal static extern JsErrorCode JsRunSerializedScriptWithCallback( JsSerializedScriptLoadSourceCallback scriptLoadCallback, JsSerializedScriptUnloadCallback scriptUnloadCallback, byte[] buffer, JsSourceContext sourceContext, string sourceUrl, out JsValue result);
internal static extern JsErrorCode JsAddRef(JsValue reference, out uint count);
internal static extern JsErrorCode JsGetAndClearException(out JsValue exception);
internal static extern JsErrorCode JsRun(JsValue script, JsSourceContext sourceContext, JsValue sourceUrl, JsParseScriptAttributes parseAttributes, out JsValue result);
internal static extern JsErrorCode JsRunScript(string script, JsSourceContext sourceContext, string sourceUrl, out JsValue result);
internal static extern JsErrorCode JsSerialize(JsValue script, out JsValue buffer, JsParseScriptAttributes parseAttributes);
internal static extern JsErrorCode JsRunSerialized(JsValue buffer, JsSerializedLoadScriptCallback scriptLoadCallback, JsSourceContext sourceContext, JsValue sourceUrl, out JsValue result);
internal static extern JsErrorCode JsCopyString(JsValue value, byte[] buffer, UIntPtr bufferSize, out UIntPtr written);
internal static extern JsErrorCode JsCreateString(string content, UIntPtr length, out JsValue value);
internal static extern JsErrorCode JsCreateFunction(JsNativeFunction nativeFunction, IntPtr externalData, out JsValue function);
internal static extern JsErrorCode JsRunSerializedScript(string script, byte[] buffer, JsSourceContext sourceContext, string sourceUrl, out JsValue result);
internal static extern JsErrorCode JsCreateReferenceError(JsValue message, out JsValue error);
internal static extern JsErrorCode JsPointerToString(string value, UIntPtr stringLength, out JsValue stringValue);
internal static extern JsErrorCode JsCreateStringUtf8(string content, UIntPtr length, out JsValue value);
internal static extern JsErrorCode JsStringToPointer(JsValue value, out IntPtr stringValue, out UIntPtr stringLength);
internal static extern JsErrorCode JsRelease(JsValue reference, out uint count);
internal static extern JsErrorCode JsSetObjectBeforeCollectCallback(JsValue reference, IntPtr callbackState, JsObjectBeforeCollectCallback beforeCollectCallback);
internal static extern JsErrorCode JsCreateSymbol(JsValue description, out JsValue symbol);
internal static extern JsErrorCode JsGetContextOfObject(JsValue obj, out JsContext context);
/// <summary> /// Initializes a new instance of the <see cref="JsScriptException"/> class /// </summary> /// <param name="errorCode">The error code returned</param> /// <param name="error">The JavaScript error object</param> public JsScriptException(JsErrorCode errorCode, JsValue error) : this(errorCode, error, "JavaScript Exception") { }
internal static extern JsErrorCode JsConstructObject(JsValue function, JsValue[] arguments, ushort argumentCount, out JsValue result);
internal static extern JsErrorCode JsGetPropertyIdFromSymbol(JsValue symbol, out JsPropertyId propertyId);
internal static extern JsErrorCode JsCreateNamedFunction(JsValue name, JsNativeFunction nativeFunction, IntPtr callbackState, out JsValue function);
internal static extern JsErrorCode JsCreateURIError(JsValue message, out JsValue error);
internal static extern JsErrorCode JsGetOwnPropertySymbols(JsValue obj, out JsValue propertySymbols);
internal static extern JsErrorCode JsCopyStringUtf8(JsValue value, byte[] buffer, UIntPtr bufferSize, out UIntPtr written);
internal static extern JsErrorCode JsGetNullValue(out JsValue nullValue);
internal static extern JsErrorCode JsGetTrueValue(out JsValue trueValue);
internal static extern JsErrorCode JsGetFalseValue(out JsValue falseValue);
internal static extern JsErrorCode JsBoolToBoolean(bool value, out JsValue booleanValue);
internal static extern JsErrorCode JsBooleanToBool(JsValue booleanValue, out bool boolValue);
internal static extern JsErrorCode JsConvertValueToBoolean(JsValue value, out JsValue booleanValue);
internal static extern JsErrorCode JsGetValueType(JsValue value, out JsValueType type);
internal static extern JsErrorCode JsDoubleToNumber(double doubleValue, out JsValue value);
internal static extern JsErrorCode JsIntToNumber(int intValue, out JsValue value);
internal static extern JsErrorCode JsCallFunction(JsValue function, JsValue[] arguments, ushort argumentCount, out JsValue result);
/// <summary> /// Initializes a new instance of the <see cref="JsScriptException"/> class /// with a specified error message /// </summary> /// <param name="errorCode">The error code returned</param> /// <param name="error">The JavaScript error object</param> /// <param name="message">The error message</param> public JsScriptException(JsErrorCode errorCode, JsValue error, string message) : base(errorCode, message) { _error = error; }
internal static extern JsErrorCode JsGetAndClearExceptionWithMetadata(out JsValue metadata);