{"id":116,"date":"2007-01-02T21:02:16","date_gmt":"2007-01-02T21:02:16","guid":{"rendered":"http:\/\/kera.name\/articles\/2007\/01\/r-for-reverse-b-for-backwards-rb-for-really-bad\/"},"modified":"2007-01-02T21:02:16","modified_gmt":"2007-01-02T21:02:16","slug":"r-for-reverse-b-for-backwards-rb-for-really-bad","status":"publish","type":"post","link":"https:\/\/kera.name\/articles\/2007\/01\/r-for-reverse-b-for-backwards-rb-for-really-bad\/","title":{"rendered":"R for Reverse, B for Backwards, RB for Really Bad"},"content":{"rendered":"<p>I <a title=\"kera.name Articles \u00c2\u00bb Bit Late For Standards Now, IE\" href=\"https:\/\/kera.name\/articles\/2006\/08\/bit-late-for-standards-now-ie\/\">wrote<\/a> a few months back about web engineers worldwide fighting to stop the advance of the false notion that using getElementById() shortcuts is a good idea. Apparently some scripters have only just discovered the IE trick and are now encouraging everyone else to dump the proper DOM methods and write malformed code.<\/p>\n<p><a rel=\"nofollow\" href=\"http:\/\/www.raizlabs.com\/blog\/2006\/12\/no-more-getelementbyid.html\"><a href=\"http:\/\/www.raizlabs.com\/blog\/2006\/12\/no-more-getelementbyid.html\">http:\/\/www.raizlabs.com\/blog\/2006\/12\/no-more-getelementbyid.html<\/a><\/a><\/p>\n<p>Real browsers such as FF will accept it if you have JavaScript settings set a certain way, but traditionally this &#039;shortcut&#039; has been the primary cause for scripts failing on other browsers when written for IE, because it was IE which propogated the idea that it&#039;s valid Javascript.<\/p>\n<p>It&#039;s also a bad idea to rely on implicitly available DOM elements from this position in the variable space, for the same reason that you shouldn&#039;t use Magic Variables in PHP&#8230; albeit slightly less of a risk in Javascript.<\/p>\n<p>Argh.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wrote a few months back about web engineers worldwide fighting to stop the advance of the false notion that using getElementById shortcuts is a good idea.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[9,12],"_links":{"self":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/posts\/116"}],"collection":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":0,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"wp:attachment":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}