Skip to content

Commit

Permalink
misc/chrome/gophertool: replace deprecated tabs.getSelected method
Browse files Browse the repository at this point in the history
tabs.getSelected has been deprecated since Chrome 33. Instead,
use tabs.query.

Fixes #35663

Change-Id: I4f7f17f948987aff8409ac8210f04eb1f7ebf908
Reviewed-on: https://go-review.googlesource.com/c/go/+/207402
Reviewed-by: Andrew Bonventre <andybons@golang.org>
  • Loading branch information
ramenjuniti authored and andybons committed Nov 18, 2019
1 parent 0ac8739 commit f9dd99c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion misc/chrome/gophertool/background.js
@@ -1,7 +1,7 @@
chrome.omnibox.onInputEntered.addListener(function(t) {
var url = urlForInput(t);
if (url) {
chrome.tabs.getSelected(null, function(tab) {
chrome.tabs.query({ "active": true, "currentWindow": true }, function(tab) {
if (!tab) return;
chrome.tabs.update(tab.id, { "url": url, "selected": true });
});
Expand Down

0 comments on commit f9dd99c

Please sign in to comment.