Created attachment 68196 [details] screenshot quite simply code <html> <head> <script> function doit() { var xhr = new XMLHttpRequest(); xhr.open("GET", "test.xhr", false); xhr.send(); } </script> </head> <body onload="doit()"> </body> </html> If we set a breakpoint in the code then on reload we will get: 1) two entry in the list of file at Scripts panel. Just one per each call stack entry. 2) second entry in call stack with wrapper around onload event. 3) file content has only the text of function which was selected in the call stack. No other functions, no other html text. See screenshot.
Two problems here: 1) Resource has not been pushed to the front-end at the time of script evaluation yet. 2) inline DOM handlers are shown with their wrappers I think (1) can be solved for many cases via swapping order of notifications in the frame loader.