Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46fe26861c |
@@ -141,13 +141,15 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
|
||||
iframeLoad() {
|
||||
if (this.webiframe && this.iframeUrl.value) {
|
||||
// This hack deals with Firefox iframes having a valid src,
|
||||
// but 'about:blank' contentWindow on (load) events
|
||||
setTimeout(() => {
|
||||
const href = this.webiframe.nativeElement.contentWindow.frames.location.href;
|
||||
const niceURL = href.match(/.*?\/\/.*?(\/.*)/)[1];
|
||||
const href = this.webiframe.nativeElement.contentWindow.frames.location.href;
|
||||
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;
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user