mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 11:52:54 +00:00 
			
		
		
		
	@@ -160,12 +160,21 @@ export class DashboardComponent implements OnInit, OnDestroy {
 | 
			
		||||
 | 
			
		||||
  iframeLoad(): void {
 | 
			
		||||
    if (this.webiframe) {
 | 
			
		||||
      this.actualIframeUrl = this.webiframe.nativeElement.contentWindow.frames.location.pathname;
 | 
			
		||||
      const href = this.webiframe.nativeElement.contentWindow.frames.location.href;
 | 
			
		||||
      const niceURL = href.match(/.*?\/\/.*?(\/.*)/)[1];
 | 
			
		||||
      this.actualIframeUrl = niceURL;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  changeIframeURL() {
 | 
			
		||||
    this.webiframe.nativeElement.contentWindow.frames.location.pathname = this.urlbar.nativeElement.value;
 | 
			
		||||
    const userGivenValue = this.urlbar.nativeElement.value.trim();
 | 
			
		||||
    if(
 | 
			
		||||
        userGivenValue == '/' ||
 | 
			
		||||
        userGivenValue.startsWith('dashboard') ||
 | 
			
		||||
        userGivenValue.startsWith('/dashboard')
 | 
			
		||||
    )
 | 
			
		||||
      return;
 | 
			
		||||
    this.webiframe.nativeElement.contentWindow.frames.location.href = this.urlbar.nativeElement.value;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  pollingServerForIframeReload() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user