diff --git a/src/core/h.js b/src/core/h.js new file mode 100644 index 0000000000..a8bf3e29dd --- /dev/null +++ b/src/core/h.js @@ -0,0 +1,19 @@ +BI.Fragment = function () { +}; + +BI.h = function (type, props, children) { + if (type === BI.Fragment) { + return children; + } + if (BI.isFunction(type)) { + type = type.xtype; + } + if (type === "el") { + return BI.extend({ + el: children[0] + }, props); + } + return BI.extend({ + items: children + }, props); +}; \ No newline at end of file