WebBrowser InvokeScript

后端 未结 3 1649
我在风中等你
我在风中等你 2021-01-20 13:54

I have a Webrowser with some settings that are changed using javascript. I\'m trying to use the example here but can\'t get the correct syntax

the script looks like

3条回答
  •  一整个雨季
    2021-01-20 14:48

    Try this:

    private async void web_LoadCompleted(object sender, NavigationEventArgs e)
    {
      Object[] parameters = new Object[1]; 
      await yourBrowser.Document.InvokeScript("scriptName", parameters);
    }
    

提交回复
热议问题