Possible Duplicate:
Closing popup window created by Google Chrome extension
I've just started to play with Google Chrome extensions and tried to create some extensions from bookmarklets. I tried official Delicious bookmarklet and everythying works fine except popup that it creates doesn't close on link submit when you use similar code in extension.
Here is the code for extension:
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.getSelected(null,function(tab){
f='http://www.delicious.com/save?url='+tab.url+'&title='+tab.title+'&v=6&';a=function(){if(!window.open(f+'noui=1&jump=doclose','deliciousuiv6','location=yes,links=no,scrollbars=no,toolbar=no,width=550,height=550'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}
});
});
Is there some other method I should use if I want to close popup on link submit?