This AI is still in early stages of development.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Implementation of traditional prototypal inheritance model, including ability to call superclass methods.

 

Overview

While Javascript uses a prototypal inheritance model internally, it's generally too cumbersome for script authors to use in their scripts. It's a shame, because prototypal inheritance has no impact on object instantiation performance. Unlike "extends" approaches that developers sometimes use, prototypal inheritance also has the benefit of being able to add new methods and properties to instantiated objects by changing the superclass prototype.

To make prototypal inheritance more accessible and easier to work with, the Util API provides two functions:

Objects that use prototypal inheritance are instantiated as usual, using the new operator.

Availability BETA

Requires:

Inheritance Model

Topics:

 

  • No labels