View Full Version : Why does the LoadMask inject HTML? Why not let Element.mask do that?

26 Jan 2011, 12:21 PM
Why isn't this something that the Element.mask method does automatically?

// private
onBeforeLoad : function() {
if (!this.disabled) {
this.el.mask('<div class="x-loading-spinner"><span class="x-loading-top"></span><span class="x-loading-right
"></span><span class="x-loading-bottom"></span><span class="x-loading-left"></span></div><div class="x-loading-msg">' +
this.msg + '</div>', this.msgCls, false);
this.fireEvent('show', this, this.el, this.store);

ExtJS's element does this. Here's the ExtJS LoadMask.onBeforeLoad method.

// private
onBeforeLoad : function(){
this.el.mask(this.msg, this.msgCls);