I am trying to get the window id when an application loads my extension.
Here is what I am doing...
- Launch chrome, it loads my extension correctly.
- goto Settings->Tools and click on "Create applications shortcuts.." option.
- It will create an application shortcut on desktop
- (Close all browser instances) When you lauch that application using that shortcut, it loads background page for my extension but "currentWindow is undefined" for application shortcuts..
Here is my code in background.html.
chrome.windows.getCurrent(function(currentWindow) {
alert("Init: currentWindow.id: " + currentWindow.id);
alert(currentWindow.type);
});
NOTE: In chrome browser it works fine.
Is there any way to get the window id? when my extension is running in application mode?
Thanks!