diff options
author | wei <> | 2006-04-21 11:41:21 +0000 |
---|---|---|
committer | wei <> | 2006-04-21 11:41:21 +0000 |
commit | e1e034ced29b0b9bf11a49798b4fba4d3dd0164d (patch) | |
tree | 92120227f58c2463ddb50b1592dde0436d175189 /framework/Web/Javascripts/extended/event.js | |
parent | e57fc66ee3f5259b4f7cbd18a1cd0f6da6176f5d (diff) |
Update javascript libraries, rewrote client-side validators, removed some js files, simplified javascript compression.
Diffstat (limited to 'framework/Web/Javascripts/extended/event.js')
-rw-r--r-- | framework/Web/Javascripts/extended/event.js | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/framework/Web/Javascripts/extended/event.js b/framework/Web/Javascripts/extended/event.js index fc1c447b..40cf60a1 100644 --- a/framework/Web/Javascripts/extended/event.js +++ b/framework/Web/Javascripts/extended/event.js @@ -21,72 +21,10 @@ Object.extend(Event, // opera onload is in document, not window
var w = document.addEventListener &&
!window.addEventListener ? document : window;
- Event.__observe(w,'load',fn);
+ Event.observe(w,'load',fn);
},
/**
- * Adds the specified event listener function to the set of
- * listeners registered on given element to handle events of the
- * specified type. If <tt>useCapture</tt> is <tt>true</tt>, the
- * listener is registered as a capturing event listener. If
- * <tt>useCapture</tt> is <tt>false</tt>, it is registered as a
- * normal event listener.
- *
- * <tt>Event.observe</tt> may be called multiple times to register
- * multiple event handlers for the same type of event on the
- * same nodes. Note, however, that the DOM makes no guarantees
- * about the order in which multiple event handlers will be invoked.
- *
- * Example: Show an alert box with message "Clicked!" when a link
- * with ID "link1" is clicked.
- * <code>
- * var link1_clicked = function()
- * {
- * alert("Clicked!");
- * };
- * Event.observe("link1", "click", link1_clicked);
- * </code>
- *
- * @param {Object} element id string, DOM Element, or an Array
- * of element ids or elements.
- * @param {String} The type of event for which the event listener
- * is to be invoked. For example, "load", "click", or "mousedown".
- * @param {Function} The event listener function that will be
- * invoked when an event of the specified type is dispatched to
- * this Document node.
- * @param {Boolean} If true, the specified listener is to be
- * invoked only during the capturing phase of event propagation.
- * The more common value of <tt>false</tt> means that the listener
- * will not be invoked during the capturing phase but instead will
- * be invoked when this node is the actual event target or when the
- * event bubbles up to this node from its original target.
- */
- observe: function(elements, name, observer, useCapture)
- {
- if(!isList(elements))
- return this.__observe(elements, name, observer, useCapture);
- for(var i=0; i<elements.length; i++)
- this.__observe(elements[i], name, observer, useCapture);
- },
-
- /**
- * Register event listeners.
- * @private
- */
- __observe: function(element, name, observer, useCapture)
- {
- var element = $(element);
- useCapture = useCapture || false;
-
- if (name == 'keypress' &&
- ((navigator.appVersion.indexOf('AppleWebKit') > 0)
- || element.attachEvent))
- name = 'keydown';
-
- this._observeAndCache(element, name, observer, useCapture);
- },
-
- /**
* @param {Event} a keyboard event
* @return {Number} the Unicode character code generated by the key
* that was struck.
|