I have a issue with Chrome and Safari:
Code example:
// Get all links with the same data-test attribute
links = $('[data-test]');
//The issue is here:
// This only works in Chrome, not in safari.
var test = links[0].testProperty;
// This works in Chrome and Safari.
var test2 = $(links[0]).attr('testProperty');
console.log(test)
console.log(test2)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a href="#" testProperty="valueTest1" data-test>Test1</a>
<a href="#" testProperty="valueTest2" data-test>Test2</a>
<a href="#" testProperty="valueTest3" data-test>Test3</a>
Why Safari does not allow links[0].testProperty
?