This demo is a modified version of the Breakout game and runs in automode with three balls bouncing around and breaking the bricks. It uses some of the new Object functions introduced as a part of the Object Model Enhancements in ECMAScript5 specification.
Details of ECMAScript5 features used in this game. (Click any feature name to learn more about the feature and see code samples)
Used in the demo to create a brick prototype object with a writeable data property to count the number of broken bricks and an accessor property to set brick visibility.
Used in the demo to create various bricks from the brick prototype object. Each brick inherits the prototype's properties, and changing the visibility of each brick calls the set function.
Used in the demo to get the name of property that tracks the visibility of each brick.
Used in the demo to measure elapsed times between visual updates and re-draw based on the same.
Instead of custom tracking, the above built-in functions simplify and abstract the functionality of tracking the game's progress into the brick objects and its prototype.
Other Object functions introduced in IE9 as a part of the ECMAScript5 Object Model enhancements