Route a NappletMessage envelope to the matching service handler.
NAP-domain services are routed by the domain prefix of message.type (e.g., 'signer.signEvent' -> 'signer' service).
INC-routed services receive inc.emit messages and are routed by the topic prefix before ':' (e.g., topic 'audio:play' -> 'audio' service).
Returns true if a service handled the message, false otherwise.
The napplet window that sent the message
The NappletMessage envelope to route
The service registry to look up handlers
Callback to send messages back to the napplet
true if a service handled the message, false if no matching service
const handled = routeServiceMessage(windowId, msg, services, sendToNapplet);if (!handled) { // fallback handling } Copy
const handled = routeServiceMessage(windowId, msg, services, sendToNapplet);if (!handled) { // fallback handling }
Route a NappletMessage envelope to the matching service handler.
NAP-domain services are routed by the domain prefix of message.type (e.g., 'signer.signEvent' -> 'signer' service).
INC-routed services receive inc.emit messages and are routed by the topic prefix before ':' (e.g., topic 'audio:play' -> 'audio' service).
Returns true if a service handled the message, false otherwise.