Component Like Object. Minimumm requirement for any object to be hosted by a template
interface CLObject
{
get rootNodes(): Node[];
update(): void;
destroy(): void;
setMounted(mounted: boolean): void;
readonly isSingleRoot?: boolean;
readonly rootNode?: Node;
}
Notifies the object it can release held resources
destroy(): void;
If present and if true, indicates this object will only ever have a single root node
readonly isSingleRoot?: boolean;
Returns the root node (if isSingleRoot is true)
readonly rootNode?: Node;
Gets the root nodes of this object
get rootNodes(): Node[];
Notifies the object is has been mounted or unmounted
setMounted(mounted: boolean): void;
mounted
True when the object has been mounted, false when unmountedInstructs the object to update its DOM
update(): void;
Implemented by all objects that manage a DOM tree.
interface DomTree extends CLObject
{
rebind(): void;
}
Instructs the DomTree that the model property of the DomTree's context object has changed and that it should rebind to the new instance
rebind(): void;
A function that creates a DomTree
type DomTreeConstructor = (DomTreeContext: any) => DomTree;
Context object for DomTrees.
interface DomTreeContext
{
get model(): object;
}
The context's model object
get model(): object;
Contains a HTML string
class HtmlString {
static areEqual(a: any, b: any): boolean;
constructor(html: string);
html: string;
}
Compares two values and returns true if they
are both HtmlString instances and both have the
same inner html
value.
static areEqual(a: any, b: any): boolean;
a
The first value to compare
b
The second value to compare
Constructs a new HtmlString object
constructor(html: string);
html
The HTML stringThe HTML string
html: string;
Utility functions for working with CSS styles
class Style {
static declare(css: string): void;
}
Declares a CSS style string to be added to the <head>
block
static declare(css: string): void;
css
The CSS string to be addedImplemented by objects that handle transitions
type TransitionHandler = {
enterNodes: (nodes: Node[]) => void;
leaveNodes: (nodes: Node[]) => void;
onWillEnter: () => void;
onDidLeave: () => void;
start: () => void;
finish: () => void;
};
Registers the nodes that will be transitioned in
enterNodes: (nodes: Node[]) => void;
Instructs the TranstitionHandler to cancel any pending transition and complete all callbacks.
finish: () => void;
Registers the nodes that will be transitioned out
leaveNodes: (nodes: Node[]) => void;
Registers callback to be invoked when leaving nodes can be removed
onDidLeave: () => void;
Registers a callback to be invoked when entry nodes should be added
onWillEnter: () => void;
Instructs the TransitionHandler to start the transition
start: () => void;