google chrome - How do I open a browser window from a desktop notification that's generated from a background page? -


I have created a simple Chrome application that has a background page that shows desktop notifications when a new article is available.

If a user clicks the notification when a browser window is opened, they are taken to the new article page and everything is correct with the world.

If the browser turns off the notification is shown, then the href does not open the browser. I have tried to capture the click and set a window. Open, but that too is not working.

As a side, it would also be good if I would like to see if

any help would be great!

thanks / div>

Whether the Chrome window is open or not. Open the new tab in open new window

  chrome.windows.getCurrent (function (currentWindow) {if (currentWindow! = Null) {return chrome.tabs.create ({'url': url });} Else {return chrome .windows.create ({'url': url, 'centric': true});}});    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -