mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
11 lines
257 B
TypeScript
11 lines
257 B
TypeScript
|
|
export function mainEventHandler(data: any, ev: Event) {
|
||
|
|
if (typeof data === "function") {
|
||
|
|
data(ev);
|
||
|
|
} else {
|
||
|
|
const ctx = data[0];
|
||
|
|
const method = data[1];
|
||
|
|
const args = data[2] || [];
|
||
|
|
ctx.__owl__.component[method](...args, ev);
|
||
|
|
}
|
||
|
|
}
|