How to use @automattic/popup-monitor - 1 common examples

To help you get started, we’ve selected a few @automattic/popup-monitor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Automattic / vip-go-mu-plugins-built / jetpack / extensions / blocks / instagram-gallery / use-connect-instagram.js View on Github external
.then( connectUrl => {
				const popupMonitor = new PopupMonitor();

				popupMonitor.open(
					connectUrl,
					`connect-to-instagram-popup`,
					'toolbar=0,location=0,menubar=0,' + popupMonitor.getScreenCenterSpecs( 700, 700 )
				);

				popupMonitor.on( 'message', ( { keyring_id } ) => {
					setIsConnecting( false );
					if ( keyring_id ) {
						const token = keyring_id.toString();
						setAttributes( { accessToken: token } );
						setSelectedAccount( token );
					}
				} );

@automattic/popup-monitor

Utility to facilitate the monitoring of a popup window close action.

GPL-2.0
Latest version published 2 years ago

Package Health Score

73 / 100
Full package analysis

Popular @automattic/popup-monitor functions