Ok, I made this change, but it raises yet more questions. An onclick tag in html creates a function called onclick(), executable via foo.onclick(). It does not get stripped to click(). And when we click on that button, we are running onclick(), not click(). I'm pretty sure that's right. So how does that mesh with click()? When you click on a button or link, are we suppose to try to run both click() and onclick()? If not, then when on earth do the click() handlers run? Same question for unload(). I run onunload() when a page is finished, should I also be running unload()? I'm confused. Another interesting snippet from your code is r !== r.top That is a test to see if we're a frame inside the window, not the top window. It means the stuff after is only suppose to happen in frames. You can see top being set in http.c line 2643. I mention this because it first looks mysterious, but I'm pretty sure that's what it's doing, and I'm pretty sure edbrowse does it right. A time (to illustrate) when we want == and not === is startwindow.js line 1156. Karl Dahlke