problem in using code HTML, CSS, JS in chrome xp
hi i got this function that do brightnes on full page by clicking on button
<html id="html">
<button onclick="brightness()">lightting</button>
<script>
function brightness(){document.getElementById('html').style.filter =
"brightness(140%)";}
</script>
</html>
the code work in other chrome browsers (like chrome version 90) but in windows xp chrome its not what the problem (is it the javascript?)? what can i change so it will work?
MDN brightness says full support since v18
but
Chrome 49 is the last version to run on XP and according to can I use brightness you need -webkit
function brightness() {
document.getElementById('html').classList.toggle("bright");
}
.bright {
-webkit-filter: brightness(140%);
filter: brightness(140%);
}
<html id="html">
<button onclick="brightness()">lighting</button>