1.0.3 • Published 6 months ago

@types/popup-window v1.0.3

Weekly downloads
21
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/popup-window

Summary

This package contains type definitions for popup-window (https://github.com/webdeveric/popup-window#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/popup-window.

index.d.ts

// Type definitions for popup-window 1.0
// Project: https://github.com/webdeveric/popup-window#readme
// Definitions by: Aram Khachatrian <https://github.com/aramwram>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

interface PopupWindowConfig {
    name?: string | undefined;
    width?: number | undefined;
    height?: number | undefined;
    left?: number | undefined;
    top?: number | undefined;
    menubar?: boolean | undefined;
    toolbar?: boolean | undefined;
    location?: boolean | undefined;
    status?: boolean | undefined;
    resizable?: boolean | undefined;
    scrollbars?: boolean | undefined;
}

declare class PopupWindow {
    readonly url: string;
    readonly name: string;

    constructor(url?: string, config?: PopupWindowConfig);

    /**
     * Open a new browser window.
     */
    open(): PopupWindow;

    /**
     * Close the browser window.
     */
    close(): PopupWindow;

    /**
     * Accepts a callback - the callback is called when the window is opened.
     */
    opened(callback: (win: PopupWindow) => void): PopupWindow;

    /**
     * Accepts a callback - the callback is called when the window is closed.
     */
    blocked(callback: (win: PopupWindow) => void): PopupWindow;

    /**
     * Accepts a callback - the callback is called when the window is blocked from opening.
     */
    closed(callback: (win: PopupWindow) => void): PopupWindow;
}

export = PopupWindow;

Additional Details

  • Last updated: Thu, 08 Jul 2021 20:19:43 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Aram Khachatrian.

1.0.2

7 months ago

1.0.3

6 months ago

1.0.1

3 years ago

1.0.0

4 years ago