{"id":56,"date":"2013-04-26T00:49:49","date_gmt":"2013-04-26T00:49:49","guid":{"rendered":"http:\/\/reichartonline.de\/?page_id=56"},"modified":"2025-09-15T03:48:39","modified_gmt":"2025-09-15T03:48:39","slug":"javascript","status":"publish","type":"page","link":"https:\/\/reichartonline.de\/?page_id=56","title":{"rendered":"JavaScript"},"content":{"rendered":"<p>Well, JavaScript is Turing-complete, so we&#8217;re safe using it for any browser-related issue we may face, aren&#8217;t we?<\/p>\n<p>I would fairly disagree, as driven by powerful frameworks JavaScript is used also for implementations that are meantime within reach of CSS3 and HTML5. So I use JavaScript basically to<\/p>\n<ul>\n<li>change styles on events not supported by CSS (e.g. &#8220;click&#8221;). Note that JavaScript representations of the CSS attributes differ from their native CSS names if they contain a hyphen as JavaScript always interprets it as a minus symbol (so you need a CSS to JavaScript style mapping legend) or apply the rule &#8220;remove the hyphen, then camel-case&#8221;<\/li>\n<li>handle AJAX requests and responses<\/li>\n<li>manage browser windows and links<\/li>\n<\/ul>\n\n\n<p>But even such basic use is sometimes tricky. Just try to remove event listeners from a DOM element, that have been set by foreign code, or by a previous instance of your own code. Without juggling DOM nodes, still today, it&#8217;s impossible. So it&#8217;s not the language itself, but the BOM\/DOM APIs it uses. See <a href=\"https:\/\/reichartonline.de\/?page_id=1198\" data-type=\"page\" data-id=\"1198\">JS\/ DOM events<\/a> for some details.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, JavaScript is Turing-complete, so we&#8217;re safe using it for any browser-related issue we may face, aren&#8217;t we? I would fairly disagree, as driven by powerful frameworks JavaScript is used also for implementations that are meantime within reach of CSS3 and HTML5. So I use JavaScript basically to change styles on events not supported by [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":7,"menu_order":4,"comment_status":"closed","ping_status":"open","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-56","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/reichartonline.de\/index.php?rest_route=\/wp\/v2\/pages\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reichartonline.de\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/reichartonline.de\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/reichartonline.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/reichartonline.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=56"}],"version-history":[{"count":19,"href":"https:\/\/reichartonline.de\/index.php?rest_route=\/wp\/v2\/pages\/56\/revisions"}],"predecessor-version":[{"id":1366,"href":"https:\/\/reichartonline.de\/index.php?rest_route=\/wp\/v2\/pages\/56\/revisions\/1366"}],"up":[{"embeddable":true,"href":"https:\/\/reichartonline.de\/index.php?rest_route=\/wp\/v2\/pages\/7"}],"wp:attachment":[{"href":"https:\/\/reichartonline.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}