-
Notifications
You must be signed in to change notification settings - Fork 3.8k
FR: Add frontend hooks for pre/post debug message #5489
Copy link
Copy link
Closed
Description
As a: node/plugin developer
I want to: hook into pre and post debug message creation in the UI
So that: I can display extra tools in the debug entry toolbar span OR affect the message entry in other ways (custom styling etc) without monkey patching RED.utils.createObjectElement
This request to add 2 new hooks:
debugPreProcessMessage- This hook should be triggered before
processDebugMessage - It should send the incoming message e.g.
RED.hooks.trigger('debugPreProcessMessage', { message }) - NOTE:
processDebugMessagewill also need to return artifacts so that they can be accessed indebugPostProcessMessagehook...- proposed artifacts - { message, element, payload }
(message is the original debug message, element is the element created byprocessDebugMessage`, payload - the reconstituted debug message)
- proposed artifacts - { message, element, payload }
- This hook should be triggered before
debugPostProcessMessage- This hook should be triggered after
processDebugMessageand should include the artifacts it generated e.g.RED.hooks.trigger('debugPostProcessMessage', { message, element, payload })
- This hook should be triggered after
This will permit a node/plugin to update the debug message with a symbol or UUID that can be used as a key in the post handler and access things like the debug message data, the debug element and the final payload
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels