Esempio n. 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;
 }
Esempio n. 4
0
 internal static extern JavaScriptErrorCode JsGetOwnPropertySymbols(JavaScriptValue obj, out JavaScriptValue propertySymbols);
Esempio n. 5
0
 internal static extern JavaScriptErrorCode JsInstanceOf(JavaScriptValue obj, JavaScriptValue constructor, out bool result);
Esempio n. 6
0
 internal static extern JavaScriptErrorCode JsCreateTypedArray(JavaScriptTypedArrayType arrayType, JavaScriptValue arrayBuffer, uint byteOffset,
     uint elementLength, out JavaScriptValue result);
Esempio n. 7
0
 internal static extern JavaScriptErrorCode JsGetDataViewStorage(JavaScriptValue dataView, out byte[] buffer, out uint bufferLength);
Esempio n. 8
0
 internal static extern JavaScriptErrorCode JsCreateFunction(JavaScriptNativeFunction nativeFunction, IntPtr externalData, out JavaScriptValue function);
Esempio n. 9
0
 internal static extern JavaScriptErrorCode JsCreateURIError(JavaScriptValue message, out JavaScriptValue error);
Esempio n. 10
0
 internal static extern JavaScriptErrorCode JsCallFunction(JavaScriptValue function, JavaScriptValue[] arguments, ushort argumentCount, out JavaScriptValue result);
Esempio n. 11
0
 internal static extern JavaScriptErrorCode JsConstructObject(JavaScriptValue function, JavaScriptValue[] arguments, ushort argumentCount, out JavaScriptValue result);
Esempio n. 12
0
 internal static extern JavaScriptErrorCode JsCreateArray(uint length, out JavaScriptValue result);
Esempio n. 13
0
 internal static extern JavaScriptErrorCode JsSetExternalData(JavaScriptValue obj, IntPtr externalData);
Esempio n. 14
0
 internal static extern JavaScriptErrorCode JsHasExternalData(JavaScriptValue obj, out bool value);
Esempio n. 15
0
 internal static extern JavaScriptErrorCode JsSetException(JavaScriptValue exception);
Esempio n. 16
0
 internal static extern JavaScriptErrorCode JsGetAndClearException(out JavaScriptValue exception);
Esempio n. 17
0
 internal static extern JavaScriptErrorCode JsCreateNamedFunction(JavaScriptValue name, JavaScriptNativeFunction nativeFunction, IntPtr callbackState, out JavaScriptValue function);
Esempio n. 18
0
 internal static extern JavaScriptErrorCode JsSetException(JavaScriptValue exception);
Esempio n. 19
0
 internal static extern JavaScriptErrorCode JsGetArrayBufferStorage(JavaScriptValue arrayBuffer, out byte[] buffer, out uint bufferLength);
Esempio n. 20
0
 internal static extern JavaScriptErrorCode JsSetObjectBeforeCollectCallback(JavaScriptValue reference, IntPtr callbackState, JavaScriptObjectBeforeCollectCallback beforeCollectCallback);
Esempio n. 21
0
 internal static extern JavaScriptErrorCode JsGetSymbolFromPropertyId(JavaScriptPropertyId propertyId, out JavaScriptValue symbol);
Esempio n. 22
0
 internal static extern JavaScriptErrorCode JsCreateNamedFunction(JavaScriptValue name, JavaScriptNativeFunction nativeFunction, IntPtr callbackState, out JavaScriptValue function);
Esempio n. 23
0
 internal static extern JavaScriptErrorCode JsGetIndexedPropertiesExternalData(JavaScriptValue obj, IntPtr data, out JavaScriptTypedArrayType arrayType, out uint elementLength);
Esempio n. 24
0
 internal static extern JavaScriptErrorCode JsCreateArrayBuffer(uint byteLength, out JavaScriptValue result);
Esempio n. 25
0
 internal static extern JavaScriptErrorCode JsGetContextOfObject(JavaScriptValue obj, out JavaScriptContext context);
Esempio n. 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;
 }
Esempio n. 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));
 }
Esempio n. 30
0
 internal static extern JavaScriptErrorCode JsGetArrayBufferStorage(JavaScriptValue arrayBuffer, out byte[] buffer, out uint bufferLength);
Esempio n. 31
0
 internal static extern JavaScriptErrorCode JsGetAndClearException(out JavaScriptValue exception);
Esempio n. 32
0
 internal static extern JavaScriptErrorCode JsGetTypedArrayStorage(JavaScriptValue typedArray, out byte[] buffer, out uint bufferLength, out JavaScriptTypedArrayType arrayType, out int elementSize);
Esempio n. 33
0
 internal static extern JavaScriptErrorCode JsSetObjectBeforeCollectCallback(JavaScriptValue reference, IntPtr callbackState, JavaScriptObjectBeforeCollectCallback beforeCollectCallback);
Esempio n. 34
0
 internal static extern JavaScriptErrorCode JsGetDataViewStorage(JavaScriptValue dataView, out byte[] buffer, out uint bufferLength);
Esempio n. 35
0
 internal static extern JavaScriptErrorCode JsCreateArrayBuffer(uint byteLength, out JavaScriptValue result);
Esempio n. 36
0
 internal static extern JavaScriptErrorCode JsCreateSymbol(JavaScriptValue description, out JavaScriptValue symbol);
Esempio n. 37
0
 internal static extern JavaScriptErrorCode JsCreateDataView(JavaScriptValue arrayBuffer, uint byteOffset, uint byteOffsetLength, out JavaScriptValue result);
Esempio n. 38
0
 internal static extern JavaScriptErrorCode JsGetSymbolFromPropertyId(JavaScriptPropertyId propertyId, out JavaScriptValue symbol);
Esempio n. 39
0
 internal static extern JavaScriptErrorCode JsGetTypedArrayStorage(JavaScriptValue typedArray, out byte[] buffer, out uint bufferLength, out JavaScriptTypedArrayType arrayType, out int elementSize);
Esempio n. 40
0
 internal static extern JavaScriptErrorCode JsGetPropertyIdFromSymbol(JavaScriptValue symbol, out JavaScriptPropertyId propertyId);
Esempio n. 41
0
 internal static extern JavaScriptErrorCode JsCreateSymbol(JavaScriptValue description, out JavaScriptValue symbol);
Esempio n. 42
0
 internal static extern JavaScriptErrorCode JsGetOwnPropertySymbols(JavaScriptValue obj, out JavaScriptValue propertySymbols);
Esempio n. 43
0
 internal static extern JavaScriptErrorCode JsGetPropertyIdFromSymbol(JavaScriptValue symbol, out JavaScriptPropertyId propertyId);
Esempio n. 44
0
 internal static extern JavaScriptErrorCode JsNumberToInt(JavaScriptValue value, out int intValue);
Esempio n. 45
0
 internal static extern JavaScriptErrorCode JsNumberToInt(JavaScriptValue value, out int intValue);
Esempio n. 46
0
 internal static extern JavaScriptErrorCode JsGetIndexedPropertiesExternalData(JavaScriptValue obj, IntPtr data, out JavaScriptTypedArrayType arrayType, out uint elementLength);
Esempio n. 47
0
 internal static extern JavaScriptErrorCode JsHasIndexedPropertiesExternalData(JavaScriptValue obj, out bool value);
Esempio n. 48
0
 internal static extern JavaScriptErrorCode JsHasIndexedPropertiesExternalData(JavaScriptValue obj, out bool value);
Esempio n. 49
0
 internal static extern JavaScriptErrorCode JsGetTypedArrayInfo(JavaScriptValue typedArray, out JavaScriptTypedArrayType arrayType, out JavaScriptValue arrayBuffer, out uint byteOffset, out uint byteLength);
Esempio n. 50
0
 internal static extern JavaScriptErrorCode JsInstanceOf(JavaScriptValue obj, JavaScriptValue constructor, out bool result);
Esempio n. 51
0
 internal static extern JavaScriptErrorCode JsRunSerializedScriptWithCallback(JavaScriptSerializedScriptLoadSourceCallback scriptLoadCallback,
     JavaScriptSerializedScriptUnloadCallback scriptUnloadCallback, byte[] buffer, JavaScriptSourceContext sourceContext, string sourceUrl, out JavaScriptValue result);
Esempio n. 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));
 }
Esempio n. 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;
 }
Esempio n. 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));
 }
Esempio n. 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;
 }
Esempio n. 60
0
 internal static extern JavaScriptErrorCode JsDeleteIndexedProperty(JavaScriptValue obj, JavaScriptValue index);