internal static extern JavaScriptErrorCode JsGetOwnPropertyDescriptor(JavaScriptValue obj, JavaScriptPropertyId propertyId, out JavaScriptValue propertyDescriptor);
internal static extern JavaScriptErrorCode JsVariantToValue([MarshalAs(UnmanagedType.Struct)] ref object var, out JavaScriptValue value);
/// <summary> /// Initializes a new instance of the <see cref="JavaScriptScriptException"/> class. /// </summary> /// <param name="code">The error code returned.</param> /// <param name="error">The JavaScript error object.</param> public JavaScriptScriptException(JavaScriptErrorCode code, JavaScriptValue error) : this(code, error, "JavaScript Exception") { }
internal static extern JavaScriptErrorCode JsSetPrototype(JavaScriptValue obj, JavaScriptValue prototypeObject);
internal static extern JavaScriptErrorCode JsStringToPointer(JavaScriptValue value, out IntPtr stringValue, out UIntPtr stringLength);
internal static extern JavaScriptErrorCode JsSetException(JavaScriptValue exception);
internal static extern JavaScriptErrorCode JsSetIndexedProperty(JavaScriptValue obj, JavaScriptValue index, JavaScriptValue value);
internal static extern JavaScriptErrorCode JsGetValueType(JavaScriptValue value, out JavaScriptValueType type);
internal static extern JavaScriptErrorCode JsHasExternalData(JavaScriptValue obj, out bool value);
internal static extern JavaScriptErrorCode JsGetTrueValue(out JavaScriptValue trueValue);
internal static extern JavaScriptErrorCode JsGetUndefinedValue(out JavaScriptValue undefinedValue);
internal static extern JavaScriptErrorCode JsGetStringLength(JavaScriptValue sringValue, out int length);
internal static extern JavaScriptErrorCode JsGetProperty(JavaScriptValue obj, JavaScriptPropertyId propertyId, out JavaScriptValue value);
internal static extern JavaScriptErrorCode JsGetOwnPropertyNames(JavaScriptValue obj, out JavaScriptValue propertyNames);
internal static extern JavaScriptErrorCode JsRunScript(string script, JavaScriptSourceContext sourceContext, string sourceUrl, out JavaScriptValue result);
internal static extern JavaScriptErrorCode JsHasIndexedProperty(JavaScriptValue obj, JavaScriptValue index, out bool result);
internal static extern JavaScriptErrorCode JsRunSerializedScript(string script, byte[] buffer, JavaScriptSourceContext sourceContext, string sourceUrl, out JavaScriptValue result);
internal static extern JavaScriptErrorCode JsHasProperty(JavaScriptValue obj, JavaScriptPropertyId propertyId, out bool hasProperty);
internal static extern JavaScriptErrorCode JsSetExternalData(JavaScriptValue obj, IntPtr externalData);
internal static extern JavaScriptErrorCode JsIntToNumber(int intValue, out JavaScriptValue value);
internal static extern JavaScriptErrorCode JsSetProperty(JavaScriptValue obj, JavaScriptPropertyId propertyId, JavaScriptValue value, bool useStrictRules);
internal static extern JavaScriptErrorCode JsNumberToDouble(JavaScriptValue value, out double doubleValue);
internal static extern JavaScriptErrorCode JsStrictEquals(JavaScriptValue obj1, JavaScriptValue obj2, out bool result);
internal static extern JavaScriptErrorCode JsPointerToString(string value, UIntPtr stringLength, out JavaScriptValue stringValue);
internal static extern JavaScriptErrorCode JsValueToVariant(JavaScriptValue obj, [MarshalAs(UnmanagedType.Struct)] out object var);
internal static extern JavaScriptErrorCode JsPreventExtension(JavaScriptValue obj);
/// <summary> /// Sets the runtime of the current context to an exception state. /// </summary> /// <remarks> /// <para> /// If the runtime of the current context is already in an exception state, this API will /// throw <c>JsErrorInExceptionState</c>. /// </para> /// <para> /// Requires an active script context. /// </para> /// </remarks> /// <param name="exception"> /// The JavaScript exception to set for the runtime of the current context. /// </param> public static void SetException(JavaScriptValue exception) { Native.ThrowIfError(Native.JsSetException(exception)); }
internal static extern JavaScriptErrorCode JsRelease(JavaScriptValue reference, out uint count);
/// <summary> /// Initializes a new instance of the <see cref="JavaScriptScriptException"/> class. /// </summary> /// <param name="code">The error code returned.</param> /// <param name="error">The JavaScript error object.</param> /// <param name="message">The error message.</param> public JavaScriptScriptException(JavaScriptErrorCode code, JavaScriptValue error, string message) : base(code, message) { _error = error; }
internal static extern JavaScriptErrorCode JsGetNullValue(out JavaScriptValue nullValue);