aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/jqLite.js')
-rw-r--r--src/jqLite.js17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index cff9ae00..22b3c070 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -104,19 +104,14 @@ JQLite.prototype = {
eventHandler = bind[type];
if (!eventHandler) {
bind[type] = eventHandler = function(event) {
- var bubbleEvent = false;
- foreach(eventHandler.fns, function(fn){
- bubbleEvent = bubbleEvent || fn.call(self, event);
- });
- if (!bubbleEvent) {
- if (msie) {
+ if (!event.preventDefault) {
+ event.preventDefault = function(){
event.returnValue = false;
- event.cancelBubble = true;
- } else {
- event.preventDefault();
- event.stopPropagation();
- }
+ };
}
+ foreach(eventHandler.fns, function(fn){
+ fn.call(self, event);
+ });
};
eventHandler.fns = [];
addEventListener(element, type, eventHandler);