Example #1
0
 internal static extern JavaScriptErrorCode JsStrictEquals(JavaScriptValue obj1, JavaScriptValue obj2, out bool result);
 /// <summary>
 ///     Creates a new JavaScript URIError error object
 /// </summary>
 /// <remarks>
 ///     Requires an active script context.
 /// </remarks>
 /// <param name="message">Message for the error object.</param>
 /// <returns>The new error object.</returns>
 public static JavaScriptValue CreateUriError(JavaScriptValue message)
 {
     JavaScriptValue reference;
     Native.ThrowIfError(Native.JsCreateURIError(message, out reference));
     return reference;
 }
 /// <summary>
 ///     Retrieve the value at the specified index of an object.
 /// </summary>
 /// <remarks>
 ///     Requires an active script context.
 /// </remarks>
 /// <param name="index">The index to retrieve.</param>
 /// <returns>The retrieved value.</returns>
 public JavaScriptValue GetIndexedProperty(JavaScriptValue index)
 {
     JavaScriptValue propertyReference;
     Native.ThrowIfError(Native.JsGetIndexedProperty(this, index, out propertyReference));
     return propertyReference;
 }
Example #4
0
 internal static extern JavaScriptErrorCode JsGetOwnPropertySymbols(JavaScriptValue obj, out JavaScriptValue propertySymbols);
Example #5
0
 internal static extern JavaScriptErrorCode JsInstanceOf(JavaScriptValue obj, JavaScriptValue constructor, out bool result);
Example #6
0
 internal static extern JavaScriptErrorCode JsCreateTypedArray(JavaScriptTypedArrayType arrayType, JavaScriptValue arrayBuffer, uint byteOffset,
     uint elementLength, out JavaScriptValue result);
Example #7
0
 internal static extern JavaScriptErrorCode JsGetDataViewStorage(JavaScriptValue dataView, out byte[] buffer, out uint bufferLength);
Example #8
0
 internal static extern JavaScriptErrorCode JsCreateFunction(JavaScriptNativeFunction nativeFunction, IntPtr externalData, out JavaScriptValue function);
Example #9
0
 internal static extern JavaScriptErrorCode JsCreateURIError(JavaScriptValue message, out JavaScriptValue error);
Example #10
0
 internal static extern JavaScriptErrorCode JsCallFunction(JavaScriptValue function, JavaScriptValue[] arguments, ushort argumentCount, out JavaScriptValue result);
Example #11
0
 internal static extern JavaScriptErrorCode JsConstructObject(JavaScriptValue function, JavaScriptValue[] arguments, ushort argumentCount, out JavaScriptValue result);
Example #12
0
 internal static extern JavaScriptErrorCode JsCreateArray(uint length, out JavaScriptValue result);
Example #13
0
 internal static extern JavaScriptErrorCode JsSetExternalData(JavaScriptValue obj, IntPtr externalData);
Example #14
0
 internal static extern JavaScriptErrorCode JsHasExternalData(JavaScriptValue obj, out bool value);
Example #15
0
 internal static extern JavaScriptErrorCode JsSetException(JavaScriptValue exception);
Example #16
0
 internal static extern JavaScriptErrorCode JsGetAndClearException(out JavaScriptValue exception);
Example #17
0
 internal static extern JavaScriptErrorCode JsCreateNamedFunction(JavaScriptValue name, JavaScriptNativeFunction nativeFunction, IntPtr callbackState, out JavaScriptValue function);
Example #18
0
 internal static extern JavaScriptErrorCode JsSetException(JavaScriptValue exception);
Example #19
0
 internal static extern JavaScriptErrorCode JsGetArrayBufferStorage(JavaScriptValue arrayBuffer, out byte[] buffer, out uint bufferLength);
Example #20
0
 internal static extern JavaScriptErrorCode JsSetObjectBeforeCollectCallback(JavaScriptValue reference, IntPtr callbackState, JavaScriptObjectBeforeCollectCallback beforeCollectCallback);
Example #21
0
 internal static extern JavaScriptErrorCode JsGetSymbolFromPropertyId(JavaScriptPropertyId propertyId, out JavaScriptValue symbol);
Example #22
0
 internal static extern JavaScriptErrorCode JsCreateNamedFunction(JavaScriptValue name, JavaScriptNativeFunction nativeFunction, IntPtr callbackState, out JavaScriptValue function);
Example #23
0
 internal static extern JavaScriptErrorCode JsGetIndexedPropertiesExternalData(JavaScriptValue obj, IntPtr data, out JavaScriptTypedArrayType arrayType, out uint elementLength);
Example #24
0
 internal static extern JavaScriptErrorCode JsCreateArrayBuffer(uint byteLength, out JavaScriptValue result);
Example #25
0
 internal static extern JavaScriptErrorCode JsGetContextOfObject(JavaScriptValue obj, out JavaScriptContext context);
Example #26
0
 internal static extern JavaScriptErrorCode JsCreateTypedArray(JavaScriptTypedArrayType arrayType, JavaScriptValue arrayBuffer, uint byteOffset,
                                                               uint elementLength, out JavaScriptValue result);
 /// <summary>
 ///     Defines a new object's own property from a property descriptor.
 /// </summary>
 /// <remarks>
 ///     Requires an active script context.
 /// </remarks>
 /// <param name="propertyId">The ID of the property.</param>
 /// <param name="propertyDescriptor">The property descriptor.</param>
 /// <returns>Whether the property was defined.</returns>
 public bool DefineProperty(JavaScriptPropertyId propertyId, JavaScriptValue propertyDescriptor)
 {
     bool result;
     Native.ThrowIfError(Native.JsDefineProperty(this, propertyId, propertyDescriptor, out result));
     return result;
 }
Example #28
0
 internal static extern JavaScriptErrorCode JsCreateDataView(JavaScriptValue arrayBuffer, uint byteOffset, uint byteOffsetLength, out JavaScriptValue result);
 /// <summary>
 ///     Delete the value at the specified index of an object.
 /// </summary>
 /// <remarks>
 ///     Requires an active script context.
 /// </remarks>
 /// <param name="index">The index to delete.</param>
 public void DeleteIndexedProperty(JavaScriptValue index)
 {
     Native.ThrowIfError(Native.JsDeleteIndexedProperty(this, index));
 }
Example #30
0
 internal static extern JavaScriptErrorCode JsGetArrayBufferStorage(JavaScriptValue arrayBuffer, out byte[] buffer, out uint bufferLength);
Example #31
0
 internal static extern JavaScriptErrorCode JsGetAndClearException(out JavaScriptValue exception);
Example #32
0
 internal static extern JavaScriptErrorCode JsGetTypedArrayStorage(JavaScriptValue typedArray, out byte[] buffer, out uint bufferLength, out JavaScriptTypedArrayType arrayType, out int elementSize);
Example #33
0
 internal static extern JavaScriptErrorCode JsSetObjectBeforeCollectCallback(JavaScriptValue reference, IntPtr callbackState, JavaScriptObjectBeforeCollectCallback beforeCollectCallback);
Example #34
0
 internal static extern JavaScriptErrorCode JsGetDataViewStorage(JavaScriptValue dataView, out byte[] buffer, out uint bufferLength);
Example #35
0
 internal static extern JavaScriptErrorCode JsCreateArrayBuffer(uint byteLength, out JavaScriptValue result);
Example #36
0
 internal static extern JavaScriptErrorCode JsCreateSymbol(JavaScriptValue description, out JavaScriptValue symbol);
Example #37
0
 internal static extern JavaScriptErrorCode JsCreateDataView(JavaScriptValue arrayBuffer, uint byteOffset, uint byteOffsetLength, out JavaScriptValue result);
Example #38
0
 internal static extern JavaScriptErrorCode JsGetSymbolFromPropertyId(JavaScriptPropertyId propertyId, out JavaScriptValue symbol);
Example #39
0
 internal static extern JavaScriptErrorCode JsGetTypedArrayStorage(JavaScriptValue typedArray, out byte[] buffer, out uint bufferLength, out JavaScriptTypedArrayType arrayType, out int elementSize);
Example #40
0
 internal static extern JavaScriptErrorCode JsGetPropertyIdFromSymbol(JavaScriptValue symbol, out JavaScriptPropertyId propertyId);
Example #41
0
 internal static extern JavaScriptErrorCode JsCreateSymbol(JavaScriptValue description, out JavaScriptValue symbol);
Example #42
0
 internal static extern JavaScriptErrorCode JsGetOwnPropertySymbols(JavaScriptValue obj, out JavaScriptValue propertySymbols);
Example #43
0
 internal static extern JavaScriptErrorCode JsGetPropertyIdFromSymbol(JavaScriptValue symbol, out JavaScriptPropertyId propertyId);
Example #44
0
 internal static extern JavaScriptErrorCode JsNumberToInt(JavaScriptValue value, out int intValue);
Example #45
0
 internal static extern JavaScriptErrorCode JsNumberToInt(JavaScriptValue value, out int intValue);
Example #46
0
 internal static extern JavaScriptErrorCode JsGetIndexedPropertiesExternalData(JavaScriptValue obj, IntPtr data, out JavaScriptTypedArrayType arrayType, out uint elementLength);
Example #47
0
 internal static extern JavaScriptErrorCode JsHasIndexedPropertiesExternalData(JavaScriptValue obj, out bool value);
Example #48
0
 internal static extern JavaScriptErrorCode JsHasIndexedPropertiesExternalData(JavaScriptValue obj, out bool value);
Example #49
0
 internal static extern JavaScriptErrorCode JsGetTypedArrayInfo(JavaScriptValue typedArray, out JavaScriptTypedArrayType arrayType, out JavaScriptValue arrayBuffer, out uint byteOffset, out uint byteLength);
Example #50
0
 internal static extern JavaScriptErrorCode JsInstanceOf(JavaScriptValue obj, JavaScriptValue constructor, out bool result);
Example #51
0
 internal static extern JavaScriptErrorCode JsRunSerializedScriptWithCallback(JavaScriptSerializedScriptLoadSourceCallback scriptLoadCallback,
     JavaScriptSerializedScriptUnloadCallback scriptUnloadCallback, byte[] buffer, JavaScriptSourceContext sourceContext, string sourceUrl, out JavaScriptValue result);
Example #52
0
 internal static extern JavaScriptErrorCode JsGetTypedArrayInfo(JavaScriptValue typedArray, out JavaScriptTypedArrayType arrayType, out JavaScriptValue arrayBuffer, out uint byteOffset, out uint byteLength);
 /// <summary>
 ///     Sets an object's property.
 /// </summary>
 /// <remarks>
 ///     Requires an active script context.
 /// </remarks>
 /// <param name="id">The ID of the property.</param>
 /// <param name="value">The new value of the property.</param>
 /// <param name="useStrictRules">The property set should follow strict mode rules.</param>
 public void SetProperty(JavaScriptPropertyId id, JavaScriptValue value, bool useStrictRules)
 {
     Native.ThrowIfError(Native.JsSetProperty(this, id, value, useStrictRules));
 }
Example #54
0
 internal static extern JavaScriptErrorCode JsGetContextOfObject(JavaScriptValue obj, out JavaScriptContext context);
 /// <summary>
 ///     Test if an object has a value at the specified index.
 /// </summary>
 /// <remarks>
 ///     Requires an active script context.
 /// </remarks>
 /// <param name="index">The index to test.</param>
 /// <returns>Whether the object has an value at the specified index.</returns>
 public bool HasIndexedProperty(JavaScriptValue index)
 {
     bool hasProperty;
     Native.ThrowIfError(Native.JsHasIndexedProperty(this, index, out hasProperty));
     return hasProperty;
 }
Example #56
0
 internal static extern JavaScriptErrorCode JsRunSerializedScriptWithCallback(JavaScriptSerializedScriptLoadSourceCallback scriptLoadCallback,
                                                                              JavaScriptSerializedScriptUnloadCallback scriptUnloadCallback, byte[] buffer, JavaScriptSourceContext sourceContext, string sourceUrl, out JavaScriptValue result);
 /// <summary>
 ///     Set the value at the specified index of an object.
 /// </summary>
 /// <remarks>
 ///     Requires an active script context.
 /// </remarks>
 /// <param name="index">The index to set.</param>
 /// <param name="value">The value to set.</param>
 public void SetIndexedProperty(JavaScriptValue index, JavaScriptValue value)
 {
     Native.ThrowIfError(Native.JsSetIndexedProperty(this, index, value));
 }
Example #58
0
 internal static extern JavaScriptErrorCode JsCreateURIError(JavaScriptValue message, out JavaScriptValue error);
 /// <summary>
 ///     Compare two JavaScript values for strict equality.
 /// </summary>
 /// <remarks>
 ///     <para>
 ///     This function is equivalent to the "===" operator in JavaScript.
 ///     </para>
 ///     <para>
 ///     Requires an active script context.
 ///     </para>
 /// </remarks>
 /// <param name="other">The object to compare.</param>
 /// <returns>Whether the values are strictly equal.</returns>
 public bool StrictEquals(JavaScriptValue other)
 {
     bool equals;
     Native.ThrowIfError(Native.JsStrictEquals(this, other, out equals));
     return equals;
 }
Example #60
0
 internal static extern JavaScriptErrorCode JsDeleteIndexedProperty(JavaScriptValue obj, JavaScriptValue index);