Detalhes do pacote

@lemuria/popup

kumarikandam13MIT1.1.1

The Function To Open A Popup.

popup, lemuria

readme (leia-me)

@lemuria/popup

npm version

@lemuria/popup is The Function To Open A Popup.

yarn add @lemuria/popup

Table Of Contents

API

The package is available by importing its default function:

import Popup from '@lemuria/popup'

The package publishes both main and module fields, where main exports a CommonJS module (require), and module exports an ES6 module (import).

Popup(
  url: string,
  title: string,
  width=: ?number,
  height=: ?number,
  features=: !Object<string, string>,
): Window

Opens a popup in the middle of the screen by setting width/left and height/top properties according to the arguments. See https://developer.mozilla.org/en-US/docs/Web/API/Window/open for all features. Returns the reference to the window.

  • <kbd>url*</kbd> string: The URL to open.
  • <kbd>title*</kbd> string: The window title.
  • <kbd>width</kbd> ?number (optional): The width of the popup. Enables horizontal centering.
  • <kbd>height</kbd> ?number (optional): The height of the popup. Enables vertical centering.
  • <kbd>features</kbd> !Object<string, string> (optional): Window features. When compiling with Closure Compiler, some properties might need to appear in quotes, e.g., { 'status': 'no' } as there are no externs for them.
import Popup from '@lemuria/popup'

const editor = Popup('/admin/editor', 'Editor', 900, 650, {
  menubar: 'yes',
})

Copyright

Window features are copyright of MDN authors.

Art Deco © Art Deco 2019 Tech Nation Visa Tech Nation Visa Sucks

changelog (log de mudanças)

13 September 2019

1.1.1

  • [fix] Correct RequireJS export.

1.1.0

  • [package] Compile into RequireJS.

15 June 2019

1.0.0

  • [package] Publish v1.0.0 of the package.

14 June 2019

0.0.0-pre