The JavaScript value
The JavaScript value is one of the following types of values: Undefined, Null, Boolean, String, Number, or Object.
Exemple #1
0
 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);
Exemple #8
0
 internal static extern JsErrorCode JsRunScript(string script, JsSourceContext sourceContext,
                                                string sourceUrl, out JsValue result);
Exemple #9
0
 internal static extern JsErrorCode JsRunSerializedScriptWithCallback(
     JsSerializedScriptLoadSourceCallback scriptLoadCallback,
     JsSerializedScriptUnloadCallback scriptUnloadCallback, byte[] buffer,
     JsSourceContext sourceContext, string sourceUrl, out JsValue result);
Exemple #10
0
 internal static extern JsErrorCode JsSerialize(JsValue script, out JsValue buffer,
                                                JsParseScriptAttributes parseAttributes);
Exemple #11
0
 internal static extern JsErrorCode JsRunSerialized(JsValue buffer,
                                                    JsSerializedLoadScriptCallback scriptLoadCallback, JsSourceContext sourceContext,
                                                    JsValue sourceUrl, out JsValue result);
Exemple #12
0
 internal static extern JsErrorCode JsRun(JsValue script, JsSourceContext sourceContext, JsValue sourceUrl,
                                          JsParseScriptAttributes parseAttributes, out JsValue result);
Exemple #13
0
 internal static extern JsErrorCode JsCopyString(JsValue value, byte[] buffer, UIntPtr bufferSize,
                                                 out UIntPtr written);
Exemple #14
0
 internal static extern JsErrorCode JsCreateString(string content, UIntPtr length, out JsValue value);
		internal static extern JsErrorCode JsCreateFunction(JsNativeFunction nativeFunction, IntPtr externalData,
			out JsValue function);
Exemple #16
0
 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);
Exemple #18
0
 internal static extern JsErrorCode JsPointerToString(string value, UIntPtr stringLength,
                                                      out JsValue stringValue);
		internal static extern JsErrorCode JsCreateStringUtf8(string content, UIntPtr length, out JsValue value);
Exemple #20
0
 internal static extern JsErrorCode JsStringToPointer(JsValue value, out IntPtr stringValue,
                                                      out UIntPtr stringLength);
		internal static extern JsErrorCode JsRunSerialized(JsValue buffer,
			JsSerializedLoadScriptCallback scriptLoadCallback, JsSourceContext sourceContext,
			JsValue sourceUrl, out JsValue result);
Exemple #22
0
 internal static extern JsErrorCode JsAddRef(JsValue reference, out uint count);
		internal static extern JsErrorCode JsPointerToString(string value, UIntPtr stringLength,
			out JsValue stringValue);
Exemple #24
0
 internal static extern JsErrorCode JsRelease(JsValue reference, out uint count);
		internal static extern JsErrorCode JsSetObjectBeforeCollectCallback(JsValue reference, IntPtr callbackState,
			JsObjectBeforeCollectCallback beforeCollectCallback);
Exemple #26
0
 internal static extern JsErrorCode JsSetObjectBeforeCollectCallback(JsValue reference, IntPtr callbackState,
                                                                     JsObjectBeforeCollectCallback beforeCollectCallback);
		internal static extern JsErrorCode JsCreateSymbol(JsValue description, out JsValue symbol);
Exemple #28
0
 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")
		{ }
Exemple #30
0
 internal static extern JsErrorCode JsGetSymbolFromPropertyId(JsPropertyId propertyId, out JsValue symbol);
		internal static extern JsErrorCode JsConstructObject(JsValue function, JsValue[] arguments,
			ushort argumentCount, out JsValue result);
Exemple #32
0
 internal static extern JsErrorCode JsGetPropertyIdFromSymbol(JsValue symbol, out JsPropertyId propertyId);
		internal static extern JsErrorCode JsCreateNamedFunction(JsValue name, JsNativeFunction nativeFunction,
			IntPtr callbackState, out JsValue function);
Exemple #34
0
 internal static extern JsErrorCode JsCreateSymbol(JsValue description, out JsValue symbol);
		internal static extern JsErrorCode JsCreateURIError(JsValue message, out JsValue error);
Exemple #36
0
 internal static extern JsErrorCode JsGetOwnPropertySymbols(JsValue obj, out JsValue propertySymbols);
		internal static extern JsErrorCode JsSetException(JsValue exception);
Exemple #38
0
 internal static extern JsErrorCode JsGetUndefinedValue(out JsValue undefinedValue);
		internal static extern JsErrorCode JsCopyStringUtf8(JsValue value, byte[] buffer, UIntPtr bufferSize,
			out UIntPtr written);
Exemple #40
0
 internal static extern JsErrorCode JsGetNullValue(out JsValue nullValue);
		internal static extern JsErrorCode JsSerialize(JsValue script, out JsValue buffer,
			JsParseScriptAttributes parseAttributes);
Exemple #42
0
 internal static extern JsErrorCode JsGetTrueValue(out JsValue trueValue);
		internal static extern JsErrorCode JsRunScript(string script, JsSourceContext sourceContext,
			string sourceUrl, out JsValue result);
Exemple #44
0
 internal static extern JsErrorCode JsGetFalseValue(out JsValue falseValue);
		internal static extern JsErrorCode JsRunSerializedScript(string script, byte[] buffer,
			JsSourceContext sourceContext, string sourceUrl, out JsValue result);
Exemple #46
0
 internal static extern JsErrorCode JsBoolToBoolean(bool value, out JsValue booleanValue);
		internal static extern JsErrorCode JsStringToPointer(JsValue value, out IntPtr stringValue,
			out UIntPtr stringLength);
Exemple #48
0
 internal static extern JsErrorCode JsBooleanToBool(JsValue booleanValue, out bool boolValue);
		internal static extern JsErrorCode JsRelease(JsValue reference, out uint count);
Exemple #50
0
 internal static extern JsErrorCode JsConvertValueToBoolean(JsValue value, out JsValue booleanValue);
		internal static extern JsErrorCode JsGetContextOfObject(JsValue obj, out JsContext context);
Exemple #52
0
 internal static extern JsErrorCode JsGetValueType(JsValue value, out JsValueType type);
		internal static extern JsErrorCode JsGetPropertyIdFromSymbol(JsValue symbol, out JsPropertyId propertyId);
Exemple #54
0
 internal static extern JsErrorCode JsDoubleToNumber(double doubleValue, out JsValue value);
		internal static extern JsErrorCode JsGetOwnPropertySymbols(JsValue obj, out JsValue propertySymbols);
Exemple #56
0
 internal static extern JsErrorCode JsIntToNumber(int intValue, out JsValue value);
		internal static extern JsErrorCode JsGetNullValue(out JsValue nullValue);
		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;
		}
Exemple #60
0
 internal static extern JsErrorCode JsGetAndClearExceptionWithMetadata(out JsValue metadata);