Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Popout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import * as globalContext from './globalContext';
import './childWindowMonitor';

export class Popout extends React.Component<PopoutProps, {}> {
private id: string;
private id!: string;

private container: HTMLElement | null;
private container!: HTMLElement | null;

private setupAttempts = 0;

public styleElement: HTMLStyleElement | null;
public styleElement!: HTMLStyleElement | null;

public child: Window | null;
public child!: Window | null;

private setupOnCloseHandler(id: string, child: Window) {
// For Edge, IE browsers, the document.head might not exist here yet. We will just simply attempt again when RAF is called
Expand Down Expand Up @@ -112,7 +112,7 @@ export class Popout extends React.Component<PopoutProps, {}> {
let styleElement = child.document.createElement('link');
styleElement.type = styleSheet.type;
styleElement.rel = 'stylesheet';
styleElement.href = styleSheet.href;
styleElement.href = styleSheet.href || 'undefined';
head.appendChild(styleElement);
} finally {
if (rules) {
Expand Down Expand Up @@ -280,7 +280,7 @@ function validateUrl(url: string) {
}
}

function validatePopupBlocker(child: Window) {
function validatePopupBlocker(child: Window | null) {
if (
!child ||
child.closed ||
Expand Down