Safari 5.0 extension API and window.close()
Tuesday, July 06, 2010
Fast Forward to Safari 5.0
So I forked the delicious safari extension, from Jeveaux’s original repo, and made a few changes to enhance it. One of my updates was to include an option to allow Delicious to open in a new window as well as a new tab. A week later I decided to look into why the window wasn’t closing on the Delicious page after you’ve saved it.
Inspecting the source of Delicious’ post-save page you’ll see that it has a simple
window.close() in the
My suspicion is that, because it hasn’t been opened with
window.open(), it is classed as a standard window. My next task for the Delicious Safari Extension is to switch it over to
window.open() and then I’m going to file a report/bug/feature request to see if Safari can weigh in on it and perhaps make some small changes for us.
Update: I've got a bug report filed 8165625: Safari 5 extension API and window.close() so here's hoping that it gets some attention
Update 2: I finally found the reference to where it mentions that you can't use window.open() within the API docs. Just for people who are asking me to use
window.open() as an interim solution.