+
+Ext.core.Element.addMethods({
+
+<span id='Ext-core-Element-method-monitorMouseLeave'> /**
+</span> * Monitors this Element for the mouse leaving. Calls the function after the specified delay only if
+ * the mouse was not moved back into the Element within the delay. If the mouse <i>was</i> moved
+ * back in, the function is not called.
+ * @param {Number} delay The delay <b>in milliseconds</b> to wait for possible mouse re-entry before calling the handler function.
+ * @param {Function} handler The function to call if the mouse remains outside of this Element for the specified time.
+ * @param {Object} scope The scope (<code>this</code> reference) in which the handler function executes. Defaults to this Element.
+ * @return {Object} The listeners object which was added to this element so that monitoring can be stopped. Example usage:</pre><code>
+// Hide the menu if the mouse moves out for 250ms or more
+this.mouseLeaveMonitor = this.menuEl.monitorMouseLeave(250, this.hideMenu, this);
+
+...
+// Remove mouseleave monitor on menu destroy
+this.menuEl.un(this.mouseLeaveMonitor);
+</code></pre>
+ */
+ monitorMouseLeave: function(delay, handler, scope) {
+ var me = this,
+ timer,
+ listeners = {
+ mouseleave: function(e) {
+ timer = setTimeout(Ext.Function.bind(handler, scope||me, [e]), delay);
+ },
+ mouseenter: function() {
+ clearTimeout(timer);
+ },
+ freezeEvent: true
+ };
+
+ me.on(listeners);
+ return listeners;
+ },
+
+<span id='Ext-core-Element-method-swallowEvent'> /**
+</span> * Stops the specified event(s) from bubbling and optionally prevents the default action