/// module awk.vdom { var _ = awk.grid.Utils; export class VElement { static idSequence = 0; private id: number; private elementAttachedListeners: {(element: Element): void} []; constructor() { this.id = VElement.idSequence++; } public getId(): number { return this.id; } public addElementAttachedListener(listener: (element: Element)=>void) { if (!this.elementAttachedListeners) { this.elementAttachedListeners = []; } this.elementAttachedListeners.push(listener); } protected fireElementAttached(element: Element) { if (!this.elementAttachedListeners) { return; } for (var i = 0; i