Skip to content

[docs] Fix WebIDL Binder note about unimplemented JSImplementation methods - #28528

Open
juj wants to merge 1 commit into
emscripten-core:mainfrom
juj:docs_webidl_jsimplementation_missing_methods
Open

juj wants to merge 1 commit into
emscripten-core:mainfrom
juj:docs_webidl_jsimplementation_missing_methods

Conversation

@juj

@juj juj commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

The docs claimed that failing to implement all methods of a JSImplementation interface makes compilation fail. Compilation succeeds; instead the generated glue code throws a JavaScript exception at runtime when C++ calls a method that the JS object does not implement (see tools/webidl_binder.py).

Also fix a missing include when compiling the example code.

…thods

The docs claimed that failing to implement all methods of a JSImplementation
interface makes compilation fail. Compilation succeeds; instead the generated
glue code throws a JavaScript exception at runtime when C++ calls a method that
the JS object does not implement (see tools/webidl_binder.py).

Also add a missing #include <stddef.h> to the generated glue code: it uses
ptrdiff_t, so compiling it failed unless the user's headers happened to pull
in stddef.h first.
@juj
juj force-pushed the docs_webidl_jsimplementation_missing_methods branch from 716a141 to a9484e4 Compare December 2, 2026 18:49

This branch has not been deployed

No deployments
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.

1 participant