From c80b8feda30dab1bd66962316ea2568b6c8d1d30 Mon Sep 17 00:00:00 2001 From: Patrick Steele-Idem Date: Mon, 7 Jul 2014 15:26:45 -0600 Subject: [PATCH] Allow tag name to be passed to createNode --- compiler/TemplateCompiler.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/TemplateCompiler.js b/compiler/TemplateCompiler.js index 6a718fd71..cae81125a 100644 --- a/compiler/TemplateCompiler.js +++ b/compiler/TemplateCompiler.js @@ -216,6 +216,11 @@ TemplateCompiler.prototype = { }, createNode: function(Ctor, arg) { + if (typeof Ctor === 'string') { + var tagName = Ctor; + Ctor = this.getNodeClass(tagName); + } + ok(Ctor != null, 'Ctor is required'); ok(typeof Ctor === 'function', 'Ctor should be a function');