CHAPTER 8
Designing for JavaScript
We chose the JSWindows project because it was well-suited to class-based inheritance. Consider the inheritance chain for the window-closing button.
Button_close Button Rect Wobj
Clearly, the window-closing button is a specialized instance of the generic Button. Equally clearly, the Button is a specialized Rect and the Rect is one of the objects you need to show on the screen, a specialized window object. At least this part of JSWindows fits very well into a class-based OOP inheritance hierarchy. (Not by accident. That’s why we chose the project.)
But the question remains, given the material ...
Get JavaScript Object Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.