Consider the following Javascript command:
document.getElementsByClassName('phone_label')[0].style = 'color:#ec5840';
This works fine in Firefox and Chrome, but not in Safari.
This article on the .style property does not indicate any issues with Safari. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style
Is the HTML .style property fully compatible with Safari browser? (Both desktop and iOS versions).
function changecolor() {
document.getElementsByClassName('phone_label')[0].style = 'color:#ec5840';
alert('The phone number should change to red!');
}
<p class='phone_label'>0411 111 111</p><br>
<button onclick='changecolor()'>Click</button>