Closed akosthekiss closed 4 months ago
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 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).
Function names are case sensitive,
onMessage
is not the same asonmessage
.Related to #98