{"id":275,"date":"2011-03-25T21:17:47","date_gmt":"2011-03-25T21:17:47","guid":{"rendered":"http:\/\/blog.trungson.com\/?p=275"},"modified":"2011-03-25T21:19:01","modified_gmt":"2011-03-25T21:19:01","slug":"firefox-4-ajax-javascript-execution","status":"publish","type":"post","link":"http:\/\/blog.trungson.com\/?p=275","title":{"rendered":"Firefox 4 &#8211; AJAX JavaScript Execution"},"content":{"rendered":"<p>Upgraded to Firefox 4, it&#8217;s alright, may feel a bit faster (advertised placebo?). It looks a lot like Safari. I guess there is a convergence of best practices going on.<\/p>\n<p>Anyway, here is the point of this post:<\/p>\n<p>&#8211; Firefox 3: innerHTML will execute any JavaScript code inside it (normally loading via AJAX). Other browsers do not.<br \/>\n&#8211; Firefox 4: innerHTML will not execute JS code. Same as other browsers<\/p>\n<p>Solution for those who needs this functionality: have to reorganize the code so that it calls back later, or manually extract and create nodes. But I guess it&#8217;s more consistent between browsers now. Enhanced security I guess<\/p>\n<p>Man, these bugs are the worst, you just don&#8217;t know\/remember what changes (your code, your external libraries, something else). Wasted couple hours just to get back to my last conclusion.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Upgraded to Firefox 4, it&#8217;s alright, may feel a bit faster (advertised placebo?). It looks a lot like Safari. I guess there is a convergence of best practices going on. Anyway, here is the point of this post: &#8211; Firefox 3: innerHTML will execute any JavaScript code inside it (normally loading via AJAX). Other browsers [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/275"}],"collection":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=275"}],"version-history":[{"count":2,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions"}],"predecessor-version":[{"id":281,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions\/281"}],"wp:attachment":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}