public JsValue Parse(string src, JsSourceContext ctx) { var data = Encoding.UTF8.GetBytes(src); Native.ThrowIfError(Native.JsParseModuleSource(this, ctx, data, (uint)data.Length, JsParseModuleSourceFlags.DataIsUtf8, out var exception)); return(exception); }
public JsValue RunScript(string script, byte[] buffer, JsSourceContext sourceContext, string sourceName) { ThrowIfInvalid(); Native.ThrowIfError(Native.JsRunSerializedScript(script, buffer, sourceContext, sourceName, out var result)); return(result); }
public JsValue ParseScript(string script, JsSourceContext sourceContext, string sourceName) { ThrowIfInvalid(); Native.ThrowIfError(Native.JsParseScript(script, sourceContext, sourceName, out var result)); return(result); }