コード例 #1
0
        public Task OnPromptAsync(Func <string, Task <PromptResponse> > function)
        {
            Func <object, Task <object> > promptFunction = async input =>
            {
                PromptResponse response = await function((string)input);

                return(Task.FromResult(response == null ? null : response.Response));
            };

            return(ExecuteJavascriptFunction(browser.onPrompt, new { promptFunction }));
        }
コード例 #2
0
 public Task OnPromptAsync(string message, PromptResponse response)
 {
     return(ExecuteJavascriptFunction(browser.onPrompt, new { message, response = response.Response }));
 }