summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/examples/api/tabs/inspector
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/extensions/docs/examples/api/tabs/inspector')
-rw-r--r--chrome/common/extensions/docs/examples/api/tabs/inspector/tabs_api.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/common/extensions/docs/examples/api/tabs/inspector/tabs_api.js b/chrome/common/extensions/docs/examples/api/tabs/inspector/tabs_api.js
index 1cd6e7a..a14e260 100644
--- a/chrome/common/extensions/docs/examples/api/tabs/inspector/tabs_api.js
+++ b/chrome/common/extensions/docs/examples/api/tabs/inspector/tabs_api.js
@@ -290,12 +290,13 @@ function removeWindow(windowId) {
}
function refreshSelectedTab(windowId) {
- chrome.tabs.getSelected(windowId, function(tab) {
- var input = new JsExprContext(tab);
- var output = document.getElementById('tab_' + tab.id);
+ chrome.tabs.query({active: true, currentWindow: true} function(tabs) {
+ var input = new JsExprContext(tabs[0]);
+ var output = document.getElementById('tab_' + tabs[0].id);
jstProcess(input, output);
appendToLog(
- 'selected tab refreshed -- tabId: ' + tab.id + ' url:' + tab.url);
+ 'selected tab refreshed -- tabId: ' + tabs[0].id +
+ ' url:' + tabs[0].url);
});
}