UNPKG

node-red-contrib-polymer

Version:
29 lines (23 loc) 853 B
module.exports = function(RED) { var ui = require('../ui')(RED); function PolymerExternal(config) { RED.nodes.createNode(this, config); var node = this; var done = ui.add({ node: node, control: { type: 'polymer_external', parent: config.parent, element: 'node-red-external', 'src-interval': config.srcInterval, 'src-url': config.srcUrl, 'src-type': config.srcType, attrs: ['src-url', 'src-type', 'src-interval'], width: config.width, height: config.height } }); node.on("close", done); } RED.nodes.registerType("polymer_external", PolymerExternal); };