[IMP] component: introduce OwlEvent

Closes #485
This commit is contained in:
Aaron Bohy
2019-11-21 11:27:06 +01:00
committed by Géry Debongnie
parent cb11c0118c
commit 3c0f8ac76f
3 changed files with 24 additions and 6 deletions
+15
View File
@@ -0,0 +1,15 @@
import { Component } from "../component/component";
/**
* We define here OwlEvent, a subclass of CustomEvent, with an additional
* attribute:
* - originalComponent: the component that triggered the event
*/
export class OwlEvent<T> extends CustomEvent<T> {
originalComponent: Component<any, any>;
constructor(component, eventType, options) {
super(eventType, options);
this.originalComponent = component;
}
}