{"id":3242,"date":"2014-06-23T21:07:47","date_gmt":"2014-06-23T21:07:47","guid":{"rendered":"http:\/\/webninjataylor.com\/library\/?p=3242"},"modified":"2014-06-24T20:49:38","modified_gmt":"2014-06-24T20:49:38","slug":"common-ie-bugs","status":"publish","type":"post","link":"https:\/\/webninjataylor.com\/library\/common-ie-bugs\/","title":{"rendered":"Common IE Bugs"},"content":{"rendered":"<ul>\n<li>Use\u00a0<span class=\"code\">_.each(myArray,function)<\/span> in place of <strong>.forEach()<\/strong><\/li>\n<li><span class=\"code\">myRegex.test(myString)<\/span> in place of <strong>.indexOf()<\/strong>\n<pre>var filter = \/0{3}\/;\r\nif(filter.test(orgInfo.get(\u2018payeeIdentifier\u2019)) !== false){ ... }\r\n<\/pre>\n<\/li>\n<li>Use <span class=\"code\">envt.target<\/span> in place of <strong>evnt.currentTarget<\/strong><\/li>\n<li>IE doesn\u2019t understand <strong>.trim()<\/strong> method, so add this\u2026\n<pre>\/******** FIX FOR IE TO USE TRIM() METHOD ********\/\r\nif(typeof String.prototype.trim !== 'function'){\r\n    String.prototype.trim = function(){\r\n        return this.replace(\/^\\s+|\\s+$\/g, '');\r\n    }\r\n}\r\n<\/pre>\n<\/li>\n<li>IE&#8217;s memory is more limited so JS won&#8217;t use numbers as strings for associative array keys, so [] must be {}<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Use\u00a0_.each(myArray,function) in place of .forEach() myRegex.test(myString) in place of .indexOf() var filter = \/0{3}\/; if(filter.test(orgInfo.get(\u2018payeeIdentifier\u2019)) !== false){ &#8230; } Use envt.target in place of evnt.currentTarget IE doesn\u2019t understand .trim() method, so add this\u2026 \/******** FIX FOR IE TO USE TRIM() METHOD ********\/ if(typeof String.prototype.trim !== &#8216;function&#8217;){ String.prototype.trim = function(){ return this.replace(\/^\\s+|\\s+$\/g, &#8221;); } } IE&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[144],"tags":[142,146],"class_list":["post-3242","post","type-post","status-publish","format-standard","hentry","category-web-shots","tag-debugging","tag-ie"],"_links":{"self":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/3242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/comments?post=3242"}],"version-history":[{"count":5,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/3242\/revisions"}],"predecessor-version":[{"id":3321,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/3242\/revisions\/3321"}],"wp:attachment":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/media?parent=3242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/categories?post=3242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/tags?post=3242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}