← Back to release summary

AbstractRange superclass

Category
DOM
Type
No developer-visible change
Status
Enabled by default (Chrome 90)
Intent stage
None

Summary

The bits shared between StaticRange and Range objects are put on a shared superclass named AbstractRange.

Motivation

According to the StaticRange.idl, there are some duplicate methods with Range. Create an AbstractRange superclass and move some of the methods on Range that we want on StaticRange to the superclass as well. StaticRange and Range both inherit from AbstractRange. To reclassify Range objects as "live ranges" rather than "ranges". this can be communicated more clearly to the user.

Standards & signals

Explainers: https://github.com/w3c/staticrange/issues/1

View on chromestatus.com