1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
node-red/test/resources/plugin/test-plugin/test.js

13 lines
406 B
JavaScript
Raw Permalink Normal View History

module.exports = function(RED) {
console.log("Loaded test-plugin/test")
RED.plugins.registerPlugin("my-test-plugin", {
type: "foo",
onadd: function() {
console.log("my-test-plugin.onadd called")
RED.events.on("registry:plugin-added", function(id) {
console.log(`my-test-plugin: plugin-added event "${id}"`)
});
}
})
}