lewisje / ourlibrary

Automatically exported from code.google.com/p/ourlibrary
0 stars 0 forks source link

Query module class name issue #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As the subject of hasClass came up today, I confirmed my suspicion that the 
hasClass module was sound for multiple class names and that the older logic 
in the query module, which was "duplicated" inline for performance was not.  
Actually, I think that part of the query module predates the hasClass 
function.  The issue is class names separated by white space other than 
spaces (like carriage returns).  Needless to say something that is easily 
avoided.  I think I prefer an instant failure for such ridiculous markup (a 
la getEBI letting the ID/name thing blow up in IE)  I'm going to think about 
it, but the two certainly need to agree.   :)

Subject of memoization came up too.  It's been on my list for a while to 
memoize hasClass and a few other functions that create regular expressions.

Original issue reported on code.google.com by dmark.ci...@gmail.com on 6 Apr 2010 at 11:20