July 7, 2012
The Window object in Mobile Safari on iOS has what appear to be three undocumented functions that make interaction with the default search engine possible:
The Yahoo mobile search site uses these functions to throw a (very annoying) dialog box asking "Would you like to change your default search engine to Yahoo? y/n".
I haven't yet been able to make the
setSearchEngine() function work because for some reason I don't have permission to do so (i.e.,
canSetSearchEngine() returns false).
I know the Yahoo code works so it appears that it must be possible to do. I wonder if the js file has to be hosted on a whitelisted domain related to the selected search engine. IOW - perhaps only js code served from a yahoo, google, or bing domain has permission to call the