Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

TextDecoder polyfill #1168

Merged
merged 5 commits into from Jul 23, 2018
Merged

TextDecoder polyfill #1168

merged 5 commits into from Jul 23, 2018

Conversation

SteveSandersonMS
Copy link
Member

Continuation of #1150 by @Suchiman


// TODO: Also support browsers that don't have TextDecoder (e.g., Edge)
const utf8Decoder = new TextDecoder('utf-8');
import { decodeUtf8 } from './Utf8Decoder';
Copy link
Contributor

@Suchiman Suchiman Jul 22, 2018

Choose a reason for hiding this comment

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

Pascal case decodeUtf8 to be consistent?
EDIT: On the other hand, the other imports are types, this a method...

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it’s consistent as-is already because it’s a function name, not a class name.

@SteveSandersonMS
Copy link
Member Author

@danroth27 @Eilon Do you know if this kind of attribution is acceptable? 1446c95

Or is any further change (e.g. third party notices file) required?

@Eilon
Copy link
Member

Eilon commented Jul 22, 2018

@SteveSandersonMS good catch, we definitely need this in a 3PN both in the repo (because this source code is distributed by this repo), and in the final MSI/VSIX/NUPKG/whatever, assuming this bit of code ends up in there somehow (e.g. compiled in, or as-is text).

@SteveSandersonMS
Copy link
Member Author

@Eilon @danroth27 Added to TPN file in 5ea04f8. I think this is what you've requested so I will merge it now, but please let me know if you think anything is still missing or wrong with the attribution.

@SteveSandersonMS SteveSandersonMS merged commit cc8caa8 into master Jul 23, 2018
@SteveSandersonMS SteveSandersonMS deleted the 1150-textdecoder-polyfill branch July 23, 2018 16:33
@Eilon
Copy link
Member

Eilon commented Jul 23, 2018

Yeah this looks good to me, thanks!

SteveSandersonMS added a commit to SteveSandersonMS/BlazorMigration that referenced this pull request Nov 27, 2018
* Polyfill for TextDecoder

* Move UTF8 decoder logic into a separate file. Don't polyfill globally.

* Workaround issue in UTF8 decoder logic

* Add attribution for fast-text-encoding

* Added TPN for fast-text-encoding
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants