/// <summary> /// Executes a script in browser context /// </summary> /// <typeparam name="T">The type to deserialize the result to</typeparam> /// <param name="script">Script to be evaluated in browser context</param> /// <remarks> /// If the script, returns a Promise, then the method would wait for the promise to resolve and return its value. /// </remarks> /// <returns>Task which resolves to script return value</returns> /// <seealso cref="EvaluateFunctionAsync{T}(string, object[])"/> /// <seealso cref="Page.EvaluateExpressionAsync{T}(string)"/> public Task <T> EvaluateExpressionAsync <T>(string script) => MainWorld.EvaluateExpressionAsync <T>(script);
/// <summary> /// Executes a script in browser context /// </summary> /// <param name="script">Script to be evaluated in browser context</param> /// <remarks> /// If the script, returns a Promise, then the method would wait for the promise to resolve and return its value. /// </remarks> /// <returns>Task which resolves to script return value</returns> /// <seealso cref="EvaluateFunctionAsync{T}(string, object[])"/> /// <seealso cref="Page.EvaluateExpressionAsync{T}(string)"/> public Task <JToken> EvaluateExpressionAsync(string script) => MainWorld.EvaluateExpressionAsync(script);