← Back to release summary

Expose TransformStreamDefaultController

Category
Network / Connectivity
Type
Chromium catches up
Status
Enabled by default (Chrome 105)
Intent stage
Shipped

Summary

This exposes the TransformStreamDefaultController class on the global scope. This class already exists and can be accessed using code such as let TransformStreamDefaultController; new TransformStream({ start(c) { TransformStreamDefaultController = c.constructor; } }); This change makes such code unnecessary as now TransformStreamDefaultController just exists on the global scope.

Motivation

Possible uses for the exposed class include monkeypatching properties onto TransformStreamDefaultController.prototype, or feature-testing existing properties of it more easily. (Note that the class is not constructible, i.e. new TransformStreamDefaultController() always throws, so that is not a potential use.) However, these uses are fairly esoteric. In practice this is mostly a spec-conformance fix motivated by consistency.

Standards & signals

View on chromestatus.com