Launch a popup with all standard javascript popup options available plus a center method. It will automatically harvest the url to load from the passed event if a url is not supplied, and has desirable defaults.

Parameters:
NameTypeDescription
optsobject

The options for the popup.

Since
  • 1.0.0
Returns:
Type: 
void
Example
import { popup } from "@gravityforms/utils";

function Example() {
  const url = 'https://some-place.com/';
  popup( {
      url,
      specs: {
				menubar: 0,
				scrollbars: 0,
				status: 1,
				titlebar: 1,
				toolbar: 0,
				top: 100,
				left: 100,
				width: 500,
				height: 300,
			},
  } );
}

Requires

  • module:assign