зеркало из https://github.com/mozilla/gecko-dev.git
Work around persiustence bug.
This commit is contained in:
Родитель
3119a6254c
Коммит
797cc16704
|
@ -45,22 +45,26 @@ var panelProgressListener = {
|
|||
}
|
||||
};
|
||||
|
||||
var gLoadCachedSrc = true;
|
||||
function loadWebPanel(aURI) {
|
||||
var panelBrowser = document.getElementById('web-panels-browser');
|
||||
panelBrowser.removeAttribute("src");
|
||||
panelBrowser.setAttribute("src", aURI);
|
||||
panelBrowser.setAttribute("cachedsrc", aURI);
|
||||
panelBrowser.setAttribute("cachedurl", aURI);
|
||||
gLoadCachedSrc = false;
|
||||
}
|
||||
|
||||
function load()
|
||||
{
|
||||
var panelBrowser = document.getElementById('web-panels-browser');
|
||||
panelBrowser.webProgress.addProgressListener(panelProgressListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
|
||||
if (panelBrowser.getAttribute("cachedsrc"))
|
||||
panelBrowser.setAttribute("src", panelBrowser.getAttribute("cachedsrc"));
|
||||
if (gLoadCachedSrc && panelBrowser.getAttribute("cachedurl")) {
|
||||
panelBrowser.setAttribute("src", panelBrowser.getAttribute("cachedurl"));
|
||||
}
|
||||
}
|
||||
|
||||
function unload()
|
||||
{
|
||||
document.getElementById('web-panels-browser').webProgress.removeProgressListener(panelProgressListener);
|
||||
var panelBrowser = document.getElementById('web-panels-browser');
|
||||
panelBrowser.webProgress.removeProgressListener(panelProgressListener);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
|
||||
<script type="application/x-javascript" src="chrome://browser/content/contentAreaUtils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://browser/content/web-panels.js"/>
|
||||
<browser id="web-panels-browser" persist="cachedsrc" type="content" flex="1"
|
||||
<browser id="web-panels-browser" persist="cachedurl" type="content" flex="1"
|
||||
onclick="return window.parent.contentAreaClick(event, true);"/>
|
||||
</page>
|
||||
|
|
Загрузка…
Ссылка в новой задаче