Node-RED
docsapiuiactions

RED.events

This API can be used to register and invoke Actions in the editor. Actions are individual pieces of functionality that a user may want to trigger and can be bound to keyboard shortcuts.

RED.actions API

RED.actions.add( name, handler )

Register a new action.

The name should follow the pattern [provider]:[name-of-action]. For example core:show-debug-tab.

RED.actions.add("my-custom-tab:show-custom-tab",function() {
 RED.sidebar.show("my-custom-tab");
});

RED.actions.remove( name )

Remove a previously registered action.

RED.actions.remove("my-custom-tab:show-custom-tab")

RED.actions.invoke( name, [args...])

Invoke an action by name.

When bound to a keyboard shortcut, the handler will be invoked without any arguments. But when invoked using this API, it is possible to pass in arguments.

RED.actions.invoke("my-custom-tab:show-custom-tab")

Node-RED: Low-code programming for event-driven applications.

Copyright OpenJS Foundation and Node-RED contributors. All rights reserved. The OpenJS Foundation has registered trademarks and uses trademarks. For a list of trademarks of the OpenJS Foundation, please see our Trademark Policy and Trademark List. Trademarks and logos not indicated on the list of OpenJS Foundation trademarks are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

The OpenJS Foundation | Terms of Use | Privacy Policy | OpenJS Foundation Bylaws | Trademark Policy | Trademark List | Cookie Policy

AltStyle によって変換されたページ (->オリジナル) /