2020-03-27 17:39:01 +09:00

18 lines
425 B
TypeScript

export class WindowUtil {
public static popupOpen(
url: string,
title: string = 'Messenger',
width: number,
height: number
): void {
let optionStr = `frame=true,menubar=no,location=no,resizable=yes,scrollbars=yes,status=no`;
if (width > 0) {
optionStr += `,width=${width}`;
}
if (width > 0) {
optionStr += `,height=${height + 15}`;
}
open(url, title, optionStr);
}
}