c# - Change WebBrowser content before document completed -


i have webbrowser control , navigating local html page. have code:

webbrowser.documentcompleted += ondomcontentloaded; public void ondomcontentloaded(object sender, eventargs e) {     var browser = (sender webbrowser);      if (browser != null && browser.document != null && browser.document.body != null)     {         var documenthtml = browser.document.body.innerhtml;         browser.document.body.innerhtml = helper.modifycontent(documenthtml);     } } 

in helper.modifycontent modifying html content. , have 1 problem: html page loads , it's being modified (i see few milliseconds html content changing). how can change html content before it's shown in webbrowser? , can't use such methods getelementbyid() , similar.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -