Hi there,
Trying to get some information from the currently selected Tab but I
am just getting an undefined object. This is using the dev build on
Windows XP if that matters:
Here's some code. I even tried wrapping chrome.tabs.getSelected with
the windows.getCurrent function to ensure it's fetching the right one
but no go. I am guessing my issue may be that I'm using all this
inside a jQuery setup but I would like to verify it's the issue, and
hear on some better solutions:
$(document).ready(function() {
$("#bookmark").click(function() {
var q;
chrome.windows.getCurrent(function(win) {
chrome.tabs.getSelected(win.id, function(tab) {
console.log(tab);
q = tab.url;
});
});
});
});
Additionally, what's the proper way to test when building an
extension? Using console.log() doesn't output anything to the console
so it's very tough to play around with it.
Thanks in advance and sorry if this has been answered before, I tried
searching.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Chromium-extensions" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/chromium-extensions?hl=en
-~----------~----~----~----~------~----~------~--~---