Html content, DOM and JS question


#1

Hi,

I was wondering if anyone would be able to provide an example of how to pass the DOM Element of the new “HTML CONTENT” node to a JS node, since the JS documentation doesn’t seem to provide a ‘way in’ http://docs.getnoodl.com/javascript.html

And specifically referring to this line of the documentation:
"…Attach this to Javascript nodes to perform custom layout and rendering"

Thanks!
R


#2

I believe this is what I was looking for in a JS node

inputs: {
    canvasHTMLNode: "domelement"
}

Open Sound Control (OSC)?
#3

That’s right! There’s a dirty trick you can use in case you’re unsure about the types; if you set an input to * then it’ll accept any type. I.e. canvasHTMLNode: '*'