Compare commits

...
Author SHA1 Message Date
Kristóf Tóth 46fe26861c Fix Firefox iframe about:blank after load braindeath 2019-10-02 15:58:38 +02:00
+7 -1
View File
@@ -142,10 +142,16 @@ export class DashboardComponent implements OnInit, OnDestroy {
iframeLoad() {
if (this.webiframe && this.iframeUrl.value) {
const href = this.webiframe.nativeElement.contentWindow.frames.location.href;
const niceURL = href.match(/.*?\/\/.*?(\/.*)/)[1];
console.log(href, this.webiframe.nativeElement.contentWindow);
const match = href.match(/.*?\/\/.*?(\/.*)/);
if (match !== null) {
// iframes on Firefox can have an about:blank
// contentWindow after firing a (load) event
const niceURL = match[1];
this.actualIframeUrl = niceURL;
}
}
}
changeIframeURL() {
const userGivenValue = this.urlbar.nativeElement.value.trim();