问题
I am making a Google Chrome extension that overrides the New Tab (the page that appears when the user opens a new tab or window).
I want to trigger the focus on the Google's address bar on a button click. I've read the chrome.omnibox docs, but I haven't found a method that triggers its focus.
Is there a trick how I can do that?
回答1:
The answer is: No!
I've tried a million workarounds and tricks, but nothing helped.
My conclusion is that this action is considered to be a security (and privacy) vulnerability, and therefore is not allowed.
来源:https://stackoverflow.com/questions/44586548/how-to-trigger-focus-to-the-google-chrome-address-bar-omnibox