public
Description: Prototype JavaScript framework
Homepage: http://prototypejs.org/
Clone URL: git://github.com/sstephenson/prototype.git
Prevent exception when using Selector to search for an attribute that is not 
present.
Fri Mar 28 11:31:36 -0700 2008
commit  35a70710b0cec60598ff64715316032e16cd5c87
tree    600215f8266e269222cd8e050906e66688910294
parent  55e5d645e14407d336293257d3a98eab0a06b7cd
...
 
 
1
2
3
...
1
2
3
4
5
0
@@ -1,3 +1,5 @@
0
+* Prevent exception when using Selector to search for an attribute that is not present. [gryn, Andrew Dupont]
0
+
0
 * Fix issues where Firefox improperly returns the wrong node from a call to Event.element. Also fixes possible exception in Event.element in IE. [jdalton, Andrew Dupont]
0
 
0
 * Fix issue where Safari 3 deletes custom properties from the document object when the page is returned to via the back button. [mzsanford, kangax, Andrew Dupont]
...
644
645
646
647
648
649
 
 
 
650
651
652
653
 
 
654
655
656
...
644
645
646
 
 
 
647
648
649
650
651
652
 
653
654
655
656
657
0
@@ -644,13 +644,14 @@ Object.extend(Selector, {
0
   },
0
     
0
   operators: {
0
-    '=':  function(nv, v) { return nv == v; },
0
-    '!=': function(nv, v) { return nv != v; },
0
-    '^=': function(nv, v) { return nv.startsWith(v); },
0
+    '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
0
+    '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
0
+    '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
0
     '$=': function(nv, v) { return nv.endsWith(v); },
0
     '*=': function(nv, v) { return nv.include(v); },
0
     '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
0
-    '|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); }
0
+    '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
0
+     '-').include('-' + (v || "").toUpperCase() + '-'); }
0
   },
0
   
0
   split: function(expression) {

Comments