I would like to update the tween height based on the current window height. Because in Safari Mobile the window.innerHeight changes when we scroll (Bottom Navbar of the browser).
I saved the timeline in a constant. Is there a way to update the height property without to set the whole new timeline?
const tl = gsap
.timeline({
paused: true,
})
.to('.navbar', {
height: window.innerHeight,
duration: 0.3,
ease: 'power2',
backgroundColor: '#8E0919',
})
window.addEventListener('resize', e => {
// update tweeen height with window.innerHeight
})