JSFiddle - React, Tailwind, and code Playground
by danheberden
HTML
<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
<script id="myscript" event="eventattributecontent" src="https://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js" type="text/javascript"></script>
<h1>Safari $('script').attr('event'); Bug</h1>
<p>This bug occurs when trying to use the jQuery .attr() on a script tag to access an attribute named "event". This page tests that scenario.</p>
<h2>Open Your Consoles!</h2>
JavaScript
// DOM Method
var elem = document.getElementById('myscript'),
tests = {
"Using getAttribute:" : elem.getAttribute('event'),
"Direct Property:" : elem.event,
"Direct Attr:" : elem.attributes[1].nodeValue,
"jQuery Attr:" : $(elem).attr('event')
};
$.each( tests, function( i, v ) {
console.log( i + ": " + v );
});
console.dir( elem );