Skip to main content

Event handling

Attaching event listeners​

You can attach event listeners with the dhxWindow.events.on() method:

dhxWindow.events.on("move", function(position, oldPosition, side) {
console.log("The window is moved to " + position.left, position.top)
});
note

Event names are case-insensitive.

Related sample: Window. Events

Detaching event listeners​

The dhxWindow.events.detach() method removes an event handler:

dhxWindow.events.on("move", function(position, oldPosition, side) {
console.log("The window is moved to " + position.left, position.top)
});

dhxWindow.events.detach("move");

Calling events​

The dhxWindow.events.fire() method calls an event:

dhxWindow.events.fire("name",args);
// where args is an array of arguments

List of events​

You can find the full list of Window events in the API section.