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