Create a typed sender for events produced independently of an incoming IPC
call, such as timers, file watchers, or background jobs.
Pass the defineIpcModule register function to take the module's own
resolved eventPrefix, so renaming it cannot leave the emitter sending to a
channel the bridge no longer listens on. A literal string is still accepted
for producers that have no module to point at.
Both methods drop the event when the target WebContents is already
destroyed, and emitTo accepts a handler's event.sender without prefixing
the channel a second time.
Create a typed sender for events produced independently of an incoming IPC call, such as timers, file watchers, or background jobs.
Pass the
defineIpcModuleregister function to take the module's own resolvedeventPrefix, so renaming it cannot leave the emitter sending to a channel the bridge no longer listens on. A literal string is still accepted for producers that have no module to point at.Both methods drop the event when the target
WebContentsis already destroyed, andemitToaccepts a handler'sevent.senderwithout prefixing the channel a second time.