2 window.dispatchEvent(new Event("ping"));
4 send_ping(); // ping (=1)
6 window.addEventListener("load", function () {
7 send_ping(); // ping (=2)
9 // Append a script which should call |foo|, before the encoding of this script
11 var script = document.createElement("script");
12 script.type = "text/javascript";
13 script.innerText = "send_ping();"; // ping (=3)
14 document.head.appendChild(script);