зеркало из https://github.com/mozilla/pjs.git
Bug 767978 - Create an shistory object for top-level b2g mozbrowser. r=bz
--HG-- extra : rebase_source : 55b956588fe6e2fb8dc7aa71b48c88c522ec1cbc
This commit is contained in:
Родитель
2a06a514d1
Коммит
b4a2f09048
|
@ -111,6 +111,12 @@ var shell = {
|
||||||
browserFrame.setAttribute('src', "data:text/html;charset=utf-8,%3C!DOCTYPE html>%3Cbody style='background:black;");
|
browserFrame.setAttribute('src', "data:text/html;charset=utf-8,%3C!DOCTYPE html>%3Cbody style='background:black;");
|
||||||
document.getElementById('shell').appendChild(browserFrame);
|
document.getElementById('shell').appendChild(browserFrame);
|
||||||
|
|
||||||
|
browserFrame.contentWindow
|
||||||
|
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
|
.getInterface(Ci.nsIWebNavigation)
|
||||||
|
.sessionHistory = Cc["@mozilla.org/browser/shistory;1"]
|
||||||
|
.createInstance(Ci.nsISHistory);
|
||||||
|
|
||||||
['keydown', 'keypress', 'keyup'].forEach((function listenKey(type) {
|
['keydown', 'keypress', 'keyup'].forEach((function listenKey(type) {
|
||||||
window.addEventListener(type, this, false, true);
|
window.addEventListener(type, this, false, true);
|
||||||
window.addEventListener(type, this, true, true);
|
window.addEventListener(type, this, true, true);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче