-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making util.TextDecoder
and util.TextEncoder
available on the global object
#20365
Comments
@nodejs/tsc |
+1 as semver-major. |
+1 as a major |
Just as a note: the more we add as globals, the harder it gets to lazy load parts of core to improve startup time and to minimize memory overhead. |
@BridgeAR I agree with you in general. I do think, however, in this particular case EDIT: Correction: |
See #20567. It is the combination of all those files at startup time. It is not about this specifically (it would be fine as it is right now) but I just want to point out in general that every added global is making it more difficult to load less things on startup. Using getters for the globals would help but at least for console it should not be a getter due to the spec. I do not know if that is also here the case but I guess it is. |
Just wondering since the WHATWG
URL
API was made available on the global object in Node v10.0.0: Should the WHATWGTextEncoder
andTextDecoder
APIs (that are currectly available viarequire('util')
) be made available on the global object, too, or are there any reasons for not doing so?PS: If this should be done, I'd love to start working on a PR for it.
The text was updated successfully, but these errors were encountered: