Moves nsSidebar.js to toolkit and makes it just pass messages to chrome for each API call. MainProcessSingleton listens for those messages and passes the call along to the search service. Combines the validation code into the same function and takes the opportunity to support relative URLs too. Adds a bunch of tests for these web APIs. Also fixes: Bug 518929: Implement window.external APIs in core code Bug 530847: Remove Fennec's nsISidebar implementation once that code is moved into the core Bug 517720: Adding a search engine using relative URIs is not supported
21 lines
442 B
HTML
21 lines
442 B
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<script>
|
|
function installEngine() {
|
|
var query = window.location.search.substring(1).split(":");
|
|
var func = query[0];
|
|
var args = JSON.parse(decodeURIComponent(query[1]));
|
|
|
|
if (func == "AddSearchProvider")
|
|
window.external.AddSearchProvider(...args);
|
|
else if (func == "addSearchEngine")
|
|
window.sidebar.addSearchEngine(...args);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="installEngine()">
|
|
</body>
|
|
</html>
|