ECS works well when you can predefine everything ahead of time. But, it must be extended for every additional type.
As to messaging, consider what happens when you add JavaScript that can change the DOM. Now, you need to pass messages in both directions not just What is your Height- Width, but also my Height-Width has changed. Animated Gifs or Videos now want to update things in real time, and other windows can cover parts of your view port.
And let's not forget about transparency.
PS: ECS can still work, but it starts getting really complex.
As to messaging, consider what happens when you add JavaScript that can change the DOM. Now, you need to pass messages in both directions not just What is your Height- Width, but also my Height-Width has changed. Animated Gifs or Videos now want to update things in real time, and other windows can cover parts of your view port.
And let's not forget about transparency.
PS: ECS can still work, but it starts getting really complex.