Popup window
Using popup window allows your users to complete escrow-related actions without leaving your application.
How It Works
Opening a Popup
function openPopupWindow(url: string, options: {
name?: string;
width?: number;
height?: number;
centered?: boolean;
} = {}): Window | null {
const {
name = '_blank',
width = 500,
height = 600,
centered = true
} = options;
let left = 0;
let top = 0;
if (centered) {
left = window.innerWidth / 2 - width / 2;
top = window.innerHeight / 2 - height / 2;
}
return window.open(
url,
name,
`width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=yes,status=yes`
);
}
// Usage
const popupRef = openPopupWindow(redirectUrl, {
name: 'PortafinoPopup',
width: 500,
height: 650
});Listening for Events
Available Events
Event
Description
Handling Events
Default success behaviour
Security Considerations
Error Handling
Best Practices
Last updated