How can I open a new chrome tab an emulate an omnibox entry?

时间:2016-06-30 12:44:40

标签: javascript google-chrome google-chrome-extension omnibox

I'm developing a Chrome extension and need to open a number of tabs with omnibox entries filled out.

As an example, imagine typing "test" into the omnibox, it will do a Google search for "test". However, if you type " http://test.com",它会打开该网址。我希望有同样的行为。

致电chrome.tabs.create({ url: 'test' });尝试在网址上打开新标签:chrome-extension://noaegdcbalcniptpnggbfgapjmlfxpxx/test

是否有多功能协议?例如omnibox:testomnibox:http://test.com

或API?例如chrome.omnibox.open('test')chrome.omnibox.open('http://test.com')? (我已经检查了文档,但找不到任何内容)

0 个答案:

没有答案