[whatwg] SearchBox API

On Wed, Oct 13, 2010 at 3:59 PM, Tony Gentilcore <tonyg at chromium.org> wrote:
> Hi All,
>
> We're adding instant search integration [1] to Google Chrome, allowing
> the search provider to communicate suggestions to the user agent.
>
> If there is interest, we'd like to make sure that we do this in such a
> way that any search provider or user agent can implement it.
>
> While the search boxes in most user agents support suggestions via an
> HTTP API, instant requires a DOM API. We propose exposing a
> window.navigator.searchBox object.?There is some?precedence?for this
> with window.navigator.registerProtocolHandler()/registerContentHandler()
> [2].
>
> Is this something that others are interested in? If so, any feedback
> on our working API [3]?
>
> -Tony
>
> [1] http://googlesystem.blogspot.com/2010/09/instant-search-in-google-chrome.html
> [2] http://dev.w3.org/html5/spec/Overview.html#navigator
> [3]
>
> interface SearchBox {
> ?// Search query and cursor position.
> ?readonly attribute DOMString value;
> ?readonly attribute unsigned long selectionStart;
> ?readonly attribute unsigned long selectionEnd;

I'm not quite sure I understand this proposal. Does this mean that if
the user has navigated to "http://evil.com/index.html" and starts
typing in a browser UI search box, outside the website, that the page
on evil.com can see what the user is typing?

Also, this is a pretty big feature. I assume you'll 'chrome' or
'webkit' prefix the API for now?

/ Jonas

Received on Thursday, 14 October 2010 08:43:51 UTC