Skip to content
Promisified window.open();
TypeScript JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
src
.editorconfig
.eslintrc.js
.gitattributes
.gitignore
.prettierignore
.prettierrc.js
.travis.yml
CHANGELOG.md
LICENSE
README.md
package.json
tsconfig.esm.json
tsconfig.json
tslint.json

README.md

@vangware/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.");
  });
You can’t perform that action at this time.