I made an extension that gives a button to bookmark/unbookmark a page which is then shown in a list on an overridden new tab page (https:// chrome.google.com/extensions/detail/fpjlhlkdcfibeodfpekjbfapdjjlflja). When the button is pressed the new tab page should be refreshed to show the new bookmark so there's a sendRequest on button click in the background page and a listener on the new tab page that does so. This used to work just fine. I just did an apt-get update and with version '4.0.290.0 (Developer Build 35507) Ubuntu' and now my extension to crashes when the new tab page is not already open. Is this new 'functionality' intended or do I now need to check if the page is open before I refresh it? And how would I go about doing this?
Code in question In the background page: chrome.browserAction.onClicked.addListener(function(tab) { ... //SEND MESSAGE TO NEW TAB PAGE TO REFRESH chrome.extension.sendRequest(); }); In the new tab override page: chrome.extension.onRequest.addListener( function() { window.location.reload(); //CRASH IF THE NEW TAB PAGE IS NOT OPEN });
-- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to chromium-extensi...@googlegroups.com. To unsubscribe from this group, send email to chromium-extensions+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.