Skip to content

Added TextEncoder and TextDecoder to window #664

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

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

Mischala
Copy link
Contributor

No description provided.

@msftclas
Copy link

msftclas commented Feb 23, 2019

CLA assistant check
All CLA requirements met.

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these types from inputfiles/lib/Encoding.widl already? Why do these need to be manually added to addedTypes.json?

[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options),
 Exposed=(Window,Worker)]
interface TextDecoder {
  USVString decode(optional BufferSource input, optional TextDecodeOptions options);
};
TextDecoder includes TextDecoderCommon;

@Mischala
Copy link
Contributor Author

Mischala commented Apr 3, 2019

The types exist, yes.
However, they are not applied to Window.

As I said in the PR description, calling new TextEncoder() works, however, new window.TextEncoder() does not.
This is because they type exists in scope, but has not been applied to the Window object.

@sandersn sandersn merged commit d073d50 into microsoft:master Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants