The JavaScript value
The JavaScript value is one of the following types of values: Undefined, Null, Boolean, String, Number, or Object.
Esempio n. 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);
Esempio n. 8
0
 internal static extern JsErrorCode JsRunScript(string script, JsSourceContext sourceContext,
                                                string sourceUrl, out JsValue result);
Esempio n. 9
0
 internal static extern JsErrorCode JsRunSerializedScriptWithCallback(
     JsSerializedScriptLoadSourceCallback scriptLoadCallback,
     JsSerializedScriptUnloadCallback scriptUnloadCallback, byte[] buffer,
     JsSourceContext sourceContext, string sourceUrl, out JsValue result);
Esempio n. 10
0
 internal static extern JsErrorCode JsSerialize(JsValue script, out JsValue buffer,
                                                JsParseScriptAttributes parseAttributes);
Esempio n. 11
0
 internal static extern JsErrorCode JsRunSerialized(JsValue buffer,
                                                    JsSerializedLoadScriptCallback scriptLoadCallback, JsSourceContext sourceContext,
                                                    JsValue sourceUrl, out JsValue result);
Esempio n. 12
0
 internal static extern JsErrorCode JsRun(JsValue script, JsSourceContext sourceContext, JsValue sourceUrl,
                                          JsParseScriptAttributes parseAttributes, out JsValue result);
Esempio n. 13
0
 internal static extern JsErrorCode JsCopyString(JsValue value, byte[] buffer, UIntPtr bufferSize,
                                                 out UIntPtr written);
Esempio n. 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);
Esempio n. 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);
Esempio n. 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);
Esempio n. 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);
Esempio n. 22
0
 internal static extern JsErrorCode JsAddRef(JsValue reference, out uint count);
		internal static extern JsErrorCode JsPointerToString(string value, UIntPtr stringLength,
			out JsValue stringValue);
Esempio n. 24
0
 internal static extern JsErrorCode JsRelease(JsValue reference, out uint count);
		internal static extern JsErrorCode JsSetObjectBeforeCollectCallback(JsValue reference, IntPtr callbackState,
			JsObjectBeforeCollectCallback beforeCollectCallback);
Esempio n. 26
0
 internal static extern JsErrorCode JsSetObjectBeforeCollectCallback(JsValue reference, IntPtr callbackState,
                                                                     JsObjectBeforeCollectCallback beforeCollectCallback);
		internal static extern JsErrorCode JsCreateSymbol(JsValue description, out JsValue symbol);
Esempio n. 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")
		{ }
Esempio n. 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);
Esempio n. 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);
Esempio n. 34
0
 internal static extern JsErrorCode JsCreateSymbol(JsValue description, out JsValue symbol);
		internal static extern JsErrorCode JsCreateURIError(JsValue message, out JsValue error);
Esempio n. 36
0
 internal static extern JsErrorCode JsGetOwnPropertySymbols(JsValue obj, out JsValue propertySymbols);
		internal static extern JsErrorCode JsSetException(JsValue exception);
Esempio n. 38
0
 internal static extern JsErrorCode JsGetUndefinedValue(out JsValue undefinedValue);
		internal static extern JsErrorCode JsCopyStringUtf8(JsValue value, byte[] buffer, UIntPtr bufferSize,
			out UIntPtr written);
Esempio n. 40
0
 internal static extern JsErrorCode JsGetNullValue(out JsValue nullValue);
		internal static extern JsErrorCode JsSerialize(JsValue script, out JsValue buffer,
			JsParseScriptAttributes parseAttributes);
Esempio n. 42
0
 internal static extern JsErrorCode JsGetTrueValue(out JsValue trueValue);
		internal static extern JsErrorCode JsRunScript(string script, JsSourceContext sourceContext,
			string sourceUrl, out JsValue result);
Esempio n. 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);
Esempio n. 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);
Esempio n. 48
0
 internal static extern JsErrorCode JsBooleanToBool(JsValue booleanValue, out bool boolValue);
		internal static extern JsErrorCode JsRelease(JsValue reference, out uint count);
Esempio n. 50
0
 internal static extern JsErrorCode JsConvertValueToBoolean(JsValue value, out JsValue booleanValue);
		internal static extern JsErrorCode JsGetContextOfObject(JsValue obj, out JsContext context);
Esempio n. 52
0
 internal static extern JsErrorCode JsGetValueType(JsValue value, out JsValueType type);
		internal static extern JsErrorCode JsGetPropertyIdFromSymbol(JsValue symbol, out JsPropertyId propertyId);
Esempio n. 54
0
 internal static extern JsErrorCode JsDoubleToNumber(double doubleValue, out JsValue value);
		internal static extern JsErrorCode JsGetOwnPropertySymbols(JsValue obj, out JsValue propertySymbols);
Esempio n. 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;
		}
Esempio n. 60
0
 internal static extern JsErrorCode JsGetAndClearExceptionWithMetadata(out JsValue metadata);