nodejs-mobile / nodejs-mobile

Full-fledged Node.js on Android and iOS
https://nodejs-mobile.github.io
Other
466 stars 46 forks source link

Add a callback param to startNodeWithArgument #39

Open idkwhodatis opened 8 months ago

idkwhodatis commented 8 months ago

What is the problem this feature will solve?

By adding a callback function, android apps can be notified when node.js is running

What is the feature you are proposing to solve the problem?

Add a callback param to startNodeWithArgument

What alternatives have you considered?

tried to call startNodeWithArgument in a worker thread and handler. call it in a handler will make the ui froze

tried to add callback in cpp file, but it seems: "// Start node, with argc and argv. int node_result = node::Start(argument_count, argv);" will block code after this line

idkwhodatis commented 8 months ago

my bad, the workarounds i tried are not targeting the moment node.js actually started, it's targeting the moment that node.js starts to start, need a callback param for libnode perhaps?