Common IE Bugs June 23rd, 2014
- Use _.each(myArray,function) in place of .forEach()
- myRegex.test(myString) in place of .indexOf()
var filter = /0{3}/; if(filter.test(orgInfo.get(‘payeeIdentifier’)) !== false){ ... } - Use envt.target in place of evnt.currentTarget
- IE doesn’t understand .trim() method, so add this…
/******** FIX FOR IE TO USE TRIM() METHOD ********/ if(typeof String.prototype.trim !== 'function'){ String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g, ''); } } - IE’s memory is more limited so JS won’t use numbers as strings for associative array keys, so [] must be {}