I can get window.document but how can I get document.window? I need to know how to do this in all browsers.
I can get window.document but how can I get document.window? I need to know how to do this in all browsers.
I opted to inject the DOCUMENT token from @angular/platform-browser:
import { DOCUMENT } from '@angular/platform-browser'
and then access the parent:
constructor(@Inject(DOCUMENT) private document: any) {
}
public ngOnInit() {
// this.document.defaultView || this.document.parentWindow;
}