API for Omnibox

22 views
Skip to first unread message

Данила Поярков

unread,
Apr 17, 2015, 9:45:27 PM4/17/15
to chromiu...@chromium.org
It would be really great if Chromium exposed an API for Omnibox adding window.onomniboxchange and window.onomniboxenter events.
That could be something like the following:

[
    ConstructorTemplate=Event
] interface OmniboxEvent : UIEvent {
    [InitializedByEventConstructor] readonly attribute DOMString text;
    
     void initOmniboxEvent([Default=Undefined] optional DOMString type, 
                                       [Default=Undefined] optional boolean canBubble, 
                                       [Default=Undefined] optional boolean cancelable, 
                                       [Default=Undefined] optional DOMWindow view, 
                                       [Default=Undefined] DOMString text);
};

Maybe there should be a special meta tag defining omnibox keyword (which is used as prefix).
This feature in future will allow to remove search bars from top of the pages on sites like Google and Facebook, providing a simpler and cleaner look.

PhistucK

unread,
Apr 18, 2015, 4:14:50 AM4/18/15
to Данила Поярков, Chromium HTML5
Omnibox is a Chrome feature and as such, it will not be standardized with that name - for sure.

There is an extension API for the omnibox, though, which you can use when you build extensions.


PhistucK

--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html...@chromium.org.
To post to this group, send email to chromiu...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Jonathan Garbee

unread,
Apr 18, 2015, 7:34:33 AM4/18/15
to Chromium HTML5
I'd rather sites not be allowed to know when I'm interacting with the browser. You can inform users that your site can be added as a custom search engine (in fact Chrome automatically does this for me in some situations I believe) which will them get that effect. However, there is no way to know if the user has done this, so you can't remove the search input for them.

Данила Поярков

unread,
Apr 18, 2015, 11:49:24 AM4/18/15
to Jonathan Garbee, Chromium HTML5
This could also be called Address Bar API or something like that. All most popular browsers have the similar-looking interface with all-in-one address bar. As with extension API for the omnibox, sites must get notified only if user allowed such kind of interaction and only after a prefix keyword was entered.

PhistucK

unread,
Apr 18, 2015, 11:54:46 AM4/18/15
to Данила Поярков, Jonathan Garbee, Chromium HTML5
Correct, the user knows whatever they are typing might be visible to a third party, which is a good thing.

If you want to propose a new standard API, you should try Specifiction, or the WHATWG or W3C mailing lists.


PhistucK

Данила Поярков

unread,
Apr 18, 2015, 12:17:00 PM4/18/15
to Chromium HTML5
Started disscussion here.
Reply all
Reply to author
Forward
0 new messages