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

Fix termination in Worker test #336

Merged

Conversation

akosthekiss
Copy link
Contributor

Function names are case sensitive, onMessage is not the same as onmessage.

Related to #98

Function names are case sensitive, `onMessage` is not the same as
`onmessage`.

Related to bellard#98
@chqrlie
Copy link
Collaborator

chqrlie commented Jul 27, 2024

While I approve this fix for consistency reasons, as onmessage is used in quickjs-libc.c, the spelling seems inconsistent with the rest of the API and at least one reputable source uses onMessage: I personally have never used these extensions, can someone explain the difference?

@chqrlie chqrlie merged commit 6e2e68f into bellard:master Jul 27, 2024
13 checks passed
@akosthekiss akosthekiss deleted the fix-test-worker-module-onmessage branch July 27, 2024 21:51
@akosthekiss
Copy link
Contributor Author

@chqrlie As far as I know, the Worker API of QuickJS is based on the Web Worker API (https://github.com/bellard/quickjs/blob/master/doc/quickjs.texi#L813). According to the HTML Living Standard (https://html.spec.whatwg.org/#workers), workers have onmessage (all lower case) and postMessage (camel case).

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