mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-01 05:16:23 +00:00
Make iframe toggleable
This commit is contained in:
@ -115,15 +115,15 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
this.terminalMenuItem.next(item);
|
||||
}
|
||||
|
||||
scrollMessagesToBottom(): void {
|
||||
scrollMessagesToBottom() {
|
||||
const element = this.messages.nativeElement;
|
||||
// This must be done in the Angular event loop to avoid messing up
|
||||
// change detection (not in the template like ConsoleComponent does)
|
||||
element.scrollTop = element.scrollHeight;
|
||||
}
|
||||
|
||||
iframeLoad(): void {
|
||||
if (this.webiframe) {
|
||||
iframeLoad() {
|
||||
if (this.webiframe && this.iframeUrl.value) {
|
||||
const href = this.webiframe.nativeElement.contentWindow.frames.location.href;
|
||||
const niceURL = href.match(/.*?\/\/.*?(\/.*)/)[1];
|
||||
this.actualIframeUrl = niceURL;
|
||||
|
Reference in New Issue
Block a user