Permalink
Browse files

Fixing missing declaration of index variable in Event.delegate method

  • Loading branch information...
1 parent 0bbca7e commit a16b814b6e35ca71e6cae874bfffce373d54d23c Morgan Roderick committed May 5, 2009
Showing with 13 additions and 6 deletions.
  1. +1 −0 dist/lowpro.js
  2. +1 −1 dist/lowpro.min.js
  3. BIN dist/lowpro.zip
  4. +1 −0 src/behavior.js
  5. +10 −5 test/lowpro.js
View
@@ -127,6 +127,7 @@ Event.delegate = function(rules) {
if ( selector !== null ){
var parts = $A(selector.split(','));
var match_found = false;
+ var i = 0;
while( !match_found && i < parts.length ){
match_found = element.match(parts[i++]);
}
View
Oops, something went wrong.
View
Binary file not shown.
View
@@ -39,6 +39,7 @@ Event.delegate = function(rules) {
if ( selector !== null ){
var parts = $A(selector.split(','));
var match_found = false;
+ var i = 0;
while( !match_found && i < parts.length ){
match_found = element.match(parts[i++]);
}
View
@@ -1,3 +1,4 @@
+/* jslint immed:false */
LowPro = {};
LowPro.Version = '0.5';
LowPro.CompatibleWithPrototype = '1.6';
@@ -32,7 +33,10 @@ DOM.Builder = {
};
},
create : function(tag, attrs, children) {
- attrs = attrs || {}; children = children || []; tag = tag.toLowerCase();
+ tag = tag.toLowerCase();
+ attrs = attrs || {};
+ children = children || [];
+
var el = new Element(tag, attrs);
for (var i=0; i<children.length; i++) {
@@ -123,6 +127,7 @@ Event.delegate = function(rules) {
if ( selector !== null ){
var parts = $A(selector.split(','));
var match_found = false;
+ var i = 0;
while( !match_found && i < parts.length ){
match_found = element.match(parts[i++]);
}
@@ -135,7 +140,7 @@ Event.delegate = function(rules) {
};
Object.extend(Event.addBehavior, {
- rules : {},
+ rules : {},
cache : [],
reassignAfterAjax : false,
autoTrigger : true,
@@ -164,9 +169,9 @@ Object.extend(Event.addBehavior, {
element.$$assigned.push(observer);
}
}
- }());
- }());
- }());
+ });
+ });
+ });
}
}
},

0 comments on commit a16b814

Please sign in to comment.