@@ -1,4 +1,4 | |||||
1 |
import { djbase, djclass |
|
1 | import { djbase, djclass } from "../declare"; | |
2 | import _WidgetBase = require("dijit/_WidgetBase"); |
|
2 | import _WidgetBase = require("dijit/_WidgetBase"); | |
3 | import _AttachMixin = require("dijit/_AttachMixin"); |
|
3 | import _AttachMixin = require("dijit/_AttachMixin"); | |
4 | import { Rendition, isNode } from "./traits"; |
|
4 | import { Rendition, isNode } from "./traits"; | |
@@ -61,11 +61,12 export abstract class DjxWidgetBase<Attr | |||||
61 | abstract render(): Rendition<HTMLElement>; |
|
61 | abstract render(): Rendition<HTMLElement>; | |
62 |
|
62 | |||
63 | private _connectEventHandlers() { |
|
63 | private _connectEventHandlers() { | |
64 | this._eventHandlers.forEach(({eventName, handlerMethod}) => { |
|
64 | if (this._eventHandlers) | |
65 | const handler = this[handlerMethod as keyof this]; |
|
65 | this._eventHandlers.forEach(({ eventName, handlerMethod }) => { | |
66 | if (typeof handler === "function") |
|
66 | const handler = this[handlerMethod as keyof this]; | |
67 | this.on(eventName, handler.bind(this)); |
|
67 | if (typeof handler === "function") | |
68 | }); |
|
68 | this.on(eventName, handler.bind(this)); | |
|
69 | }); | |||
69 | } |
|
70 | } | |
70 |
|
71 | |||
71 | _processTemplateNode<T extends (Element | Node | _WidgetBase)>( |
|
72 | _processTemplateNode<T extends (Element | Node | _WidgetBase)>( |
General Comments 0
You need to be logged in to leave comments.
Login now