shawnbot / tagalong

Progressively enhance your HTML with dynamic data
http://shawnbot.github.io/tagalong/
Other
14 stars 1 forks source link

Only render "static" nodes once #12

Open shawnbot opened 8 years ago

shawnbot commented 8 years ago

Tagalong should recognize (when creating a render function) when elements don't have any dynamic attributes or content (after descending into their children) and return a function that always returns the same (cloned) node.

shawnbot commented 8 years ago

In the morphdom world this would mean figuring out whether a node or any of its children are dynamic at compile-time, and if not returning a function that returns a (once) clone of the source node.