# Runtime events/hooks inside on running Electron

**URL:** <https://discourse.nodered.org/t/runtime-events-hooks-inside-on-running-electron/60439>\
**Category:** Core Development\
**Created:** [28 March 2022 10:05 UTC](https://discourse.nodered.org/t/runtime-events-hooks-inside-on-running-electron/60439 "2022-03-28T10:05:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mehmetul](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mehmetul/32/58553_2.png) [@mehmetul](https://discourse.nodered.org/u/mehmetul)\
**Post date:** [28 March 2022 10:05 UTC](https://discourse.nodered.org/t/runtime-events-hooks-inside-on-running-electron/60439/1 "2022-03-28T10:05:33Z")

</div>

Hello,

So I have a project about portable-node-red that using the

> **[GitHub - mdkrieg/nodered-portable: Node-RED Portable Version via Electron](https://github.com/mdkrieg/nodered-portable)**
>
> Node-RED Portable Version via Electron. Contribute to mdkrieg/nodered-portable development by creating an account on GitHub.

It is working correctly I can create nodes and run no problem but I need to change some functions of the node-red core feature especially Import and Export menus.

So I tried to callback on the runtime events like as mentioned in this topic:

> [@Deploy Event not fired](https://discourse.nodered.org/t/deploy-event-not-fired/58728):
>
> Hello, I want to take some after-deployment action. So the deploy event described here [RED.events : Node-RED](https://nodered.org/docs/api/ui/events/) is the one I want to use. But somehow the event is not fired / I am not able to catch it. I use Node Red 2.2.2 inside a NodeJS App. If I use RED.events.on('deploy', (params: RuntimeDeployEvent) =\> this.logger.warn('deploy', params), ); the logger will never be called. Although the flows-event are not triggered / caught. on the other hand RED.events.on('runtime-event', (params: R…

I can get callback like as:

```auto
        RED.events.on('runtime-event', (params) =>
            console.log("RUNTime event!: "+JSON.stringify(params))
        );

```

But ofcourse all they are triggering on the runtime.  
Is there any way to get callbacks of the Import and Export menu to user's defined function?

Have a good coding

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 May 2022 10:06 UTC](https://discourse.nodered.org/t/runtime-events-hooks-inside-on-running-electron/60439/2 "2022-05-27T10:06:02Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
