Skip to content
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

Remove __proto__ usage in RawWebsocketMessage.ts #779

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

iddogino
Copy link
Contributor

@iddogino iddogino commented Jan 2, 2024

Currently this line uses proto to get the objects prototype, which is deprecated, and according to Mozilla's docs "controversial and discouraged").

More concretely, this prevents this SDK from running in certain runtimes that do not support __proto__ - like Deno (see here: denoland/deno#4324). I suggest replacing this code to use the more modern getPrototypeOf. With that change, I can confirm this library runs on Deno as well now.

@glharper glharper self-requested a review January 27, 2024 13:51
@glharper
Copy link
Member

@iddogino Thank you so much for submitting this PR!

@glharper glharper merged commit b7903ff into microsoft:master Jan 29, 2024
1 check passed
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.

None yet

2 participants