Fix doc title and loading indicator

This commit is contained in:
Adrian Vollmer 2024-04-21 17:02:49 +02:00
parent 8aa570030b
commit b496b1cad7

View File

@ -76,6 +76,8 @@ var prepare = function(html) {
fixLinks(doc);
fixForms(doc);
window.document.title = doc.title;
return doc.documentElement.outerHTML;
}
@ -177,11 +179,7 @@ window.onload = function() {
var iframe = document.getElementById(iFrameId);
if (evnt.data.action == 'ready') {
// iframe is ready to receive the globalContext
iframe.contentWindow.postMessage({
action: "set_data",
argument: window.globalContext,
}, "*");
hideLoadingIndicator();
} else if (evnt.data.action == 'set_title') {
// iframe has finished loading and sent us its title