Skip to main content

beforeShow

fires before a window is shown

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

Parameters:

  • position: object - an object with coordinates of the window's position. The 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)

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

Change log:

The position parameter has been added in v7.0.