Answer the question
In order to leave comments, you need to log in
How to rewrite code for IE 11?
Tell me how to properly remake this code for IE 11. It swears at invalid characters and breaks all js.
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
window.addEventListener('resize', () => {
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
});
Answer the question
In order to leave comments, you need to log in
vh + 'px'
and the arrow function needs to be changed to a regular one
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question