@gradebook/external-window
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

@gradebook/external-window

Promisify window.open

Usage

const {ExternalWindowService: ExternalWindow} = require('@gradebook/external-window');

// Opens a new window centered on the screen
const externalWindow = new ExternalWindow('https://my.authentication', 'Log in to your account');

// Very naive implementation!
/** @type {HTMLButtonElement} */
myButton.addEventListener('click', () => {
	externalWindow.requestFocus();
});

externalWindow.promise.then(fetchUserSession);

Readme

Keywords

none

Package Sidebar

Install

npm i @gradebook/external-window

Weekly Downloads

1

Version

0.3.0

License

MIT

Unpacked Size

10.9 kB

Total Files

14

Last publish

Collaborators

  • joshcos97
  • vikaspotluri123