xxxxxxxxxx
let layout = new w2layout({
name: 'layout',
panels: [
{ type: 'top', size: 40 },
{ type: 'preview', size: 200 }
]
})
// add event listener for all events
layout.on('*', event => {
console.log(event.detail, event)
});
// iterating through event handlers
for (let i in layout.handlers) {
console.log(layout.handlers[i])
}