Skip to content

Add support for sending a message (nominally JSON string) from a JS function to C++ via a Dullahan callback.#30

Open
callumlinden wants to merge 9 commits into
masterfrom
v8-msg
Open

Add support for sending a message (nominally JSON string) from a JS function to C++ via a Dullahan callback.#30
callumlinden wants to merge 9 commits into
masterfrom
v8-msg

Conversation

@callumlinden

@callumlinden callumlinden commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Add support for sending a message (2 strings: and ID and a payload) from a JavaScript function to C++ via a Dullahan callback.

Typical usage is:

const result = window.JSONtoCPP("JSON", JSON.stringify(son_payload));

and if you implement the onJStoCPPMsgCallback(const std::string id, const std::string payload) callback in your application, when the JavaScript JSONtoCPP call is made in your browser, that callback will be triggered in the C++ code and the ID / payload can be retrieved

More to come later once we figure out how best to use this

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