Skip to content

Make WebSocket lazy attributes definition possible #2180

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
Sep 23, 2024

Conversation

WebReflection
Copy link
Contributor

Description

This MR allows ws references to define after the constructor a way to read or write onmessage and other listeners without throwing on Pyodide.

Changes

  • use setattr to avoid Pyodide issue with assigning JS attributes
  • reflect what's been documented already as possibilities (both constructor and attributes through the reference)

Checklist

  • All tests pass locally
  • I have updated CHANGELOG.md
  • I have created documentation for this(if applicable)

@WebReflection WebReflection requested a review from ntoll September 23, 2024 10:31
@WebReflection WebReflection changed the title Made WebSocket lazy attributes definition possible Make WebSocket lazy attributes definition possible Sep 23, 2024
Copy link
Member

@ntoll ntoll left a comment

Choose a reason for hiding this comment

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

Shipit! :shipit:

@WebReflection WebReflection merged commit 5aaeebf into pyscript:main Sep 23, 2024
2 checks 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.

2 participants