Intent to Implement and Ship: Align behavior of window.external.IsSearchProviderInstalled and window.external.AddSearchProvider with the spec

65 views
Skip to first unread message

Daniel Cheng

unread,
Jul 26, 2016, 3:47:41 AM7/26/16
to blink-dev
dch...@chromium.org https://html.spec.whatwg.org/multipage/obsolete.html#external window.external.IsSearchProviderInstalled and window.external.AddSearchProvider will both be defined as methods that are no-ops to match the spec definition. This was never implemented in Safari. In IE10, these methods are (mostly) no-ops: IsSearchProviderInstalled always returns 2, and AddSearchProvider always returns S_OK. Firefox still implements this, but notes that it may be removed at any time. AddSearchProvider was previously already removed in https://crbug.com/542487. IsSearchProviderInstalled() is also under the removal threshhold at 0.0028%.
Firefox: No public signals Edge: Shipped (i.e. these methods were changed into no-ops) Safari: No public signals (this API was never supported) Web developers: No signals Low. AddSearchProvider()
None
Yes https://crbug.com/631325 https://www.chromestatus.com/features/5672001305837568 Yes

TAMURA, Kent

unread,
Jul 26, 2016, 4:34:18 AM7/26/16
to Daniel Cheng, blink-dev
LGTM1

--
TAMURA Kent
Software Engineer, Google


Dimitri Glazkov

unread,
Jul 26, 2016, 11:44:12 AM7/26/16
to TAMURA, Kent, Daniel Cheng, blink-dev
LGTM2

Daniel Cheng

unread,
Jul 26, 2016, 11:47:18 AM7/26/16
to Dimitri Glazkov, TAMURA, Kent, blink-dev
Btw, I forgot to mention in the initial email, but the one thing I'm a bit uncertain about is the mismatch between IE10 and the spec for IsSearchProviderInstalled: the spec says it should be a no-op, but IE10 returns 2. I don't currently have a Win10 machine to test Edge, so I have no idea what Edge does, but I'd assume it probably does the same thing. Are we worried about this from a compat standpoint?

Daniel

Chris Harrelson

unread,
Jul 26, 2016, 11:54:45 AM7/26/16
to Daniel Cheng, Dimitri Glazkov, TAMURA, Kent, blink-dev
LGTM3

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

John Abd-El-Malek

unread,
Jul 26, 2016, 1:10:30 PM7/26/16
to Daniel Cheng, Dimitri Glazkov, TAMURA, Kent, blink-dev
On Tue, Jul 26, 2016 at 8:46 AM, Daniel Cheng <dch...@chromium.org> wrote:
Btw, I forgot to mention in the initial email, but the one thing I'm a bit uncertain about is the mismatch between IE10 and the spec for IsSearchProviderInstalled: the spec says it should be a no-op, but IE10 returns 2. I don't currently have a Win10 machine to test Edge, so I have no idea what Edge does, but I'd assume it probably does the same thing. Are we worried about this from a compat standpoint?

On Windows 10, IE 11 returns 0 always, while Edge returns 2 always.

Philip Jägenstedt

unread,
Jul 26, 2016, 10:41:12 PM7/26/16
to John Abd-El-Malek, Daniel Cheng, Dimitri Glazkov, TAMURA, Kent, blink-dev
Daniel, I take it you'll try making it always return undefined per spec and revisit if that doesn't work out? Unless we have a reason to suspect that some path is less risky, then we should try that path first I think.

Daniel Cheng

unread,
Jul 26, 2016, 10:43:16 PM7/26/16
to Philip Jägenstedt, John Abd-El-Malek, Dimitri Glazkov, TAMURA, Kent, blink-dev
Yes, that's what the current CL (https://codereview.chromium.org/2177123003/) implements. I don't know how I'd measure "not working out" though. The argument for returning 2 is to try to prevent JS from spamming you set your default search, I guess, though I'm not sure if it's a problem in practice.

I've also asked for clarification on if there was a particular reason for choosing to return undefined rather than "2" to match legacy behavior.

Daniel

Philip Jägenstedt

unread,
Aug 1, 2016, 6:13:41 AM8/1/16
to Daniel Cheng, John Abd-El-Malek, Dimitri Glazkov, TAMURA, Kent, blink-dev
Since the difference is so trivial, I'd say that if you learn of a single site that would have a better user experience by returning 2, then changing the spec to do the same would make sense.

Joe Medley

unread,
Aug 2, 2016, 11:55:57 AM8/2/16
to blink-dev
Daniel,

Do you have some doubt about finishing this before the M54 feature freeze?

Joe

Daniel Cheng

unread,
Aug 2, 2016, 12:23:08 PM8/2/16
to Joe Medley, blink-dev
No. The patch is trivial and landed. The OWP launch bug needs to go through review though (which I'm not entirely sure how to trigger).

Daniel

Joe Medley

unread,
Aug 2, 2016, 5:36:33 PM8/2/16
to Daniel Cheng, blink-dev
I'm adding Chrome 54 to the status page.


Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.
Reply all
Reply to author
Forward
0 new messages