Chrome omnibox search query with extension

How to execute a search query in Chrome omnibox with extension?

I am looking for something similar to:

chrome.tabs.create({ 'url': 'some/relative/or/absolute/url' }); 

where url can be any string, and the behavior is the same as typing a string in omnibox.

thanks

+4
source share
1 answer

You cannot send requests to omnibar. This is not how the Omnibar API was implemented, especially since it will be a pretty big security issue.

Depending on why you want it, create an omnibox extension with an open API, and directly with it may be a better option.

+1
source

Source: https://habr.com/ru/post/1480503/


All Articles