I am using a WebBrowser control and loading a website. However, there is a button whose placement i need to change via JavaScript.I dont have any control over that website. Once that website is loaded in WebBrowser control, I need to run my custom JS so that i can change the position of button.
How do i do this ?
If you have no control over the website/contents, there is no elegant way to do this. Methods like InvokeScript work only with scripts available in the loaded document. See this
A crude and expensive way would be to get the website’s content(html), and adding your script, loading it from the storage or data structure you’ve used and displaying the content, with access to the function via InvokeScript. I will not recommend it.