c# - DocumentCompleted firing multiple times - accepted StackOverflow answer not working -


i test if webbrowser completed with:

webbrowser2.documentcompleted += (s, e) => {     // stuff   } 

the webpage accessing tons of js files , iframes , stuff, use below function make sure it's actual page that's completed loading.

webbrowser2.documentcompleted += (s, e) => {     if (e.url.absolutepath != (s webbrowser).url.absolutepath)     {         return;     }            // stuff     }    

however, still doesn't appear working. doing wrong or syntactically correct , there's other error in code?

documentcomplete may fired multiple times many reasons (frames, ajax, etc). @ same time, particular document, window.onload event fired once. so, perhaps, can processing upon window.onload. answered related question on how can done.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -