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.
No interop risk. This is already implemented in all other browsers. Compat risk is minimal. It would be hard for any existing code to take a dependency on this class not being exposed. Other related classes (e.g. TransformStream itself) are already exposed. And we expose lots of classes all the time without issue whenever shipping new features.
This feature can be polyfilled with the single line of code: new TransformStream({ start(c) { self.TransformStreamDefaultController = c.constructor; } });
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
No
No special DevTools support needed.
M105
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None.Contact emails
dom...@chromium.orgExplainer
None (below "Summary" and "Motivation" should be enough).Specification
https://streams.spec.whatwg.org/#ts-default-controller-classSummary
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.Blink component
Blink>Network>StreamsAPI
TAG review status
Not applicableRisks
Interoperability and Compatibility
No interop risk. This is already implemented in all other browsers. Compat risk is minimal. It would be hard for any existing code to take a dependency on this class not being exposed. Other related classes (e.g. TransformStream itself) are already exposed. And we expose lots of classes all the time without issue whenever shipping new features.
LGTM2
/Daniel
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/49740f12-6dd4-4ca2-8ee0-038752f04f93n%40chromium.org.
Alex, was this meant to be an approval?
/Daniel
Thanks for filing this intent.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/000000000000c01cbc05e3c05081%40google.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c4426a78-bf45-8c84-3d5a-f81a948ef351%40gmail.com.