aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-06-27 11:50:22 +0200
committerJames Lal <james@lightsofapollo.com>2012-06-27 11:50:22 +0200
commit20420489ef9ded9b16852bc84b4b36d5bf363680 (patch)
treeb5523d6ffdc1e98fdd3dc767916caddb8eed2321 /lib
parentc3db57754c540129bd004137ab88be69788217d2 (diff)
downloadjsCalDAV-20420489ef9ded9b16852bc84b4b36d5bf363680.tar.gz
template will now accept objects with a .render fn
Diffstat (limited to 'lib')
-rw-r--r--lib/webcals/template.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/webcals/template.js b/lib/webcals/template.js
index e966225..67205d4 100644
--- a/lib/webcals/template.js
+++ b/lib/webcals/template.js
@@ -80,6 +80,11 @@
content = false;
}
+ if (attrs && typeof(attrs.render) === 'function') {
+ content = attrs.render(this);
+ attrs = {};
+ }
+
if (typeof(tagDesc) === 'string') {
tagDesc = [this.defaultNamespace, tagDesc];
}