I agree that the execution model of JavaScript in the context of web scripting, especially in regards of security, could be better. On the other hand, I think that a too complex or restrictive model would alienate non-programmers such as web designers who don't understand (or don't want to understand) such abstract concepts.