mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
6e2a38d03c
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 --HG-- rename : browser/components/sidebar/nsSidebar.js => toolkit/components/search/nsSidebar.js extra : rebase_source : 3e9caa49383e78e73e5f111ff09fb063f2cfa7c0
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>
|