Branch: refs/heads/main
Home:
https://api.github.com/repos/nwjs/nw.js
Commit: 7fea3b5ca95187c372ef128d8ef2cec22262b09d
https://github.com/nwjs/nw.js/commit/7fea3b5ca95187c372ef128d8ef2cec22262b09d
Author: Kevin Fan <
k...@gnor.net>
Date: 2026-05-03 16:27:33 -0600 -0600
Changed paths:
M src/resources/api_nw_app.js
A docs/issue-8283-app-on-open-event.md
Log Message:
-----------
fix #8283: nw.App.on('open') callback only fires once on subsequent app launches
The API bridge's argument parsing (APISignature::ParseArgumentsToV8) wraps
JS function callbacks into native V8 bindings that become dead after the first
invocation. Since the event emitter stores the wrapper, not the original
function, subsequent event dispatches invoke a dead binding.
Fix: define on/once/removeListener/removeAllListeners as direct JS methods
on compiledApi, bypassing the API bridge's argument parsing entirely. This
matches how nw.Window.on works in api_nw_newwin.js.