-
Notifications
You must be signed in to change notification settings - Fork 172
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
add patch for text-encoding-utf-8, support utf8 #632
Conversation
Why use window instead of globalThis as the global object? Is it because events can be listened on window? |
We already use patch-package on the polyfill, can you please apply the patch there instead? |
Out of habit, but yeah this should be globalThis. |
done |
The behavior of patch-package is a bit strange, I may need to investigate further, and it seems that after installing patch, the compilation result of make js && make does not change, which is a bit strange |
Yeah when the polyfills change the Makefile doesn't quite pick it up because the dependencies across files are not detected. You can force it by deleting the .c file. |
What's strange is that this patch doesn't seem to modify the source code, so why is it added here? @@ -639,4 +640,4 @@ function UTF8Encoder(options) {
}
exports.TextEncoder = TextEncoder;
-exports.TextDecoder = TextDecoder;
\ No newline at end of file
+exports.TextDecoder = TextDecoder; I only added an alias utf8, which should cover most usage scenarios. |
Thank you! |
close: #630
If there is a better solution, please close this PR