##// END OF EJS Templates
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods

File last commit:

r22:a1ab2b5975ad v1.0.0-rc10 default
r30:a46488b209e8 v1.0.0-rc14 default
Show More
_AttachMixin.d.ts
87 lines | 2.8 KiB | video/mp2t | TypeScriptLexer
cin
created typings for basic part of dojo and dijit further work is required to...
r2 import { Handle } from "dojo/interfaces";
import _WidgetBase = require("./_WidgetBase");
cin
Switched to dojo-typings...
r22 import dojo = require("dojo/_base/kernel");
cin
created typings for basic part of dojo and dijit further work is required to...
r2
declare module "./_WidgetBase" {
interface _WidgetBase {
dojoAttachEvent: string;
dojoAttachPoint: string;
}
}
declare module "dojo/_base/kernel" {
interface Dijit {
_AttachMixin: _AttachMixinConstructor;
}
}
interface _AttachMixin {
/**
* List of widget attribute names associated with data-dojo-attach-point=... in the template, ex: ["containerNode", "labelNode"]
*/
_attachPoints: string[];
/**
* List of connections associated with data-dojo-attach-event=... in the template
*/
_attachEvents: Handle[];
/**
* Object to which attach points and events will be scoped. Defaults to 'this'.
*/
attachScope: any;
/**
* Search descendants of this.containerNode for data-dojo-attach-point and data-dojo-attach-event.
*
* Should generally be left false (the default value) both for performance and to avoid failures when this.containerNode holds other _AttachMixin instances with their own attach points and events.
*/
searchContainerNode: boolean;
/**
* Attach to DOM nodes marked with special attributes.
*/
buildRendering(): void;
/**
* hook for _WidgetsInTemplateMixin
*/
_beforeFillContent(): void;
/**
* Iterate through the dom nodes and attach functions and nodes accordingly.
*
* Map widget properties and functions to the handlers specified in the dom node and it's descendants. This function iterates over all nodes and looks for these properties:
* - dojoAttachPoint/data-dojo-attach-point
* - dojoAttachEvent/data-dojo-attach-event
*/
_attachTemplateNodes(rootNode: Element | Node): void;
/**
* Process data-dojo-attach-point and data-dojo-attach-event for given node or widget.
*
* Returns true if caller should process baseNode's children too.
*/
_processTemplateNode<T extends (Element | Node | _WidgetBase)>(
baseNode: T,
getAttrFunc: (baseNode: T, attr: string) => string,
attachFunc: (node: T, type: string, func?: Function) => Handle
): boolean;
/**
* Roughly corresponding to dojo/on, this is the default function for processing a data-dojo-attach-event. Meant to attach to DOMNodes, not to widgets.
*/
_attach(node: Element | Node, type: string, func?: Function): Handle;
/**
* Detach and clean up the attachments made in _attachtempalteNodes.
*/
_detachTemplateNodes(): void;
destroyRendering(preserveDom?: boolean): void;
}
cin
Compatibility with dojo-typings package
r21 interface _AttachMixinConstructor extends dojo._base.DeclareConstructor<_AttachMixin> { }
cin
created typings for basic part of dojo and dijit further work is required to...
r2
declare const _AttachMixin: _AttachMixinConstructor;
export = _AttachMixin;