npm

Need private packages and team management tools?Check out npm Orgs. »

@vangware/window-open-promise

2.3.1 • Public • Published

window-open-promise

[NPM Version] [Build Status]

Promised Window.open.

Usage

import { windowOpenPromise } from "@vangware/window-open-promise";
 
windowOpenPromise()
  .then(newWindow => {
    newWindow.console.log("This will log in the new window.");
    newWindow.addEventListener("beforeunload", event => {
      console.log("This will log when the new window is closed.");
    });
  })
  .catch(error => {
    console.error("This will log if the new window can't be opened.");
  });

install

npm i @vangware/window-open-promise

Downloadsweekly downloads

31

version

2.3.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability