dresscode-botex
Advanced tools
Comparing version 0.0.26 to 0.0.27
@@ -35,3 +35,8 @@ var Botex = {}; | ||
Botex.zen = function(selector, params) { | ||
Botex.zen = function(ctor, selector, params) { | ||
if (arguments.length < 3) { | ||
params = selector; | ||
selector = ctor; | ||
ctor = Botex.Tag; | ||
} | ||
selector = selector || ''; | ||
@@ -60,3 +65,3 @@ if (selector.match(/^([a-z0-9]*)((?:\.[-_a-z0-9]+)*)((?:\[[-a-z0-9]+(=[^\]]*)?])*)$/i)) { | ||
} | ||
return new Botex.Tag(selectorParams, params); | ||
return new ctor(selectorParams, params); | ||
} else { | ||
@@ -63,0 +68,0 @@ throw new TypeError('Invalid selector ' + selector); |
@@ -36,3 +36,5 @@ Botex.Widget = Bricks.inherit(Botex.Tag, { | ||
mount: function(parentEl, beforeEl) { | ||
this.unmount(); | ||
if (this._mounted) { | ||
this.unmount(); | ||
} | ||
parentEl = Bricks.DOM.getEl(parentEl); | ||
@@ -39,0 +41,0 @@ beforeEl = Bricks.DOM.getEl(beforeEl); |
{ | ||
"name": "dresscode-botex", | ||
"version": "0.0.26", | ||
"version": "0.0.27", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "dresscode-bricks": "latest", |
49417
1333