| <html> |
| <head> |
| <script> |
| // When we create an XHR from onunload, we expect it to be cancelled almost |
| // immediately afterwards. When that happens the XHR's onabort handler is |
| // called. The XHR created from there is cancelled again, but at a later point |
| // after this FRAME has already been detached from its parent. |
| var requests = []; |
| function startRequest() { |
| var x = new XMLHttpRequest(); |
| x.open("GET", location, true); |
| x.onabort = startRequest; |
| x.send(null); |
| requests.push(x); |
| } |
| </script> |
| </head> |
| <body onunload="startRequest()"></body> |
| </html> |