mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Allow tag name to be passed to createNode
This commit is contained in:
parent
ec78f78dfc
commit
c80b8feda3
@ -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');
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user