Spaces:
Paused
Paused
File size: 518 Bytes
3c3f089 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
interface Popups {
pageURL: string;
pageTitle: string;
popupWinWidth: number;
popupWinHeight: number;
}
export function nativePopup({
pageURL,
pageTitle,
popupWinWidth,
popupWinHeight,
}: Popups) {
let left = (screen.width - popupWinWidth) / 2;
let top = (screen.height - popupWinHeight) / 4;
window.open(
pageURL,
pageTitle,
"resizable=yes, width=" +
popupWinWidth +
", height=" +
popupWinHeight +
", top=" +
top +
", left=" +
left
);
}
|