Skip to content

Commit

Permalink
Add a delayAttach property that will delay attaching a node to the dom
Browse files Browse the repository at this point in the history
until attributes have been attached
  • Loading branch information
devpaul committed Aug 19, 2017
1 parent 1066f9b commit fd16bde
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 22 deletions.
9 changes: 9 additions & 0 deletions dist/maquette.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ export interface VNodeProperties {
* @param children - The children for this node.
*/
afterUpdate?(element: Element, projectionOptions: ProjectionOptions, vnodeSelector: string, properties: VNodeProperties, children: VNode[]): void;
/**
* Callback that is executed after this node has been created, but before it is added to the DOM. Child nodes and
* properties have not yet been applied.
* @param element - The element that was added to the DOM.
* @param parentNode - The parent the element will be added to this node
* @param beforeNode - The node that the element will be inserted before
*/
beforeAttach?(element: Element, parentNode: Node, beforeNode?: Node): boolean;
/**
* When specified, the event handlers will be invoked with 'this' pointing to the value.
* This is useful when using the prototype/class based implementation of Components.
Expand Down Expand Up @@ -310,6 +318,7 @@ export interface VNodeProperties {
* Note: if you use innerHTML, maquette cannot protect you from XSS vulnerabilities and you must make sure that the innerHTML value is safe.
*/
readonly innerHTML?: string;
readonly delayAttach?: boolean;
/**
* Everything that is not explicitly listed (properties and attributes that are either uncommon or custom).
*/
Expand Down
29 changes: 21 additions & 8 deletions dist/maquette.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/maquette.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit fd16bde

Please sign in to comment.