Jesus.... Visual Basic did this in the 80s and 90s just fine. Flash did it in the early 2000s.
It is doable, but it requires a stable runtime. Just the HTML/CSS ecosystem is too flaky, and HTML/CSSS is a poorly design system for this type of interactive systems/apps.