Skip to main content

beforeShow

fires before a window is shown

beforeShow: (position: IPosition) => boolean | void;

Parameters:

position: object - an object with coordinates of the window's position

Returns:

Return true to show a window, false to block showing a window.

Example

dhxWindow.events.on("BeforeShow", function(position){    console.log("A window will be shown");    return true;});

Related sample: Window. Events

The position parameter contains two attributes:

  • left - (number) the left coordinate of the window's position (in pixels)
  • top - (number) the top coordinate of the window's position (in pixels)

Change log:

The position parameter has been added in v7.0.