Technically speaking most of the code that seriously annoys me runs inside my browser, but IMO it was never realistic to hope that the myriad creators of individual web pages or web sites would collectively create a good experience for me: my only hope was for the makers of browsers to make choices different from the choices they actually made.
Clarification: the web browser makes a pretty good framework for creating user interfaces, IMO, but it is a bad way for an end user with preferences sufficiently similar to mine to access writing on the internet. Sadly it is the only way to access most of the writings on the internet.
Written documents can be extremely simple: just a sequence of characters in some well-known encoding, but most of the actual documents of interest to me on the internet are essentially programs that require execution in what is essentially a "virtual machine" as complex as any general-purpose operating system.