I am trying to replicate the following example from the plotly website. https://plot.ly/r/click-events/. I have copied the html and the js into separate files in the same directory and added the following line to the top of the html:
Could you more specific on what doesn’t work ?
Uncaught TypeError: Cannot read property 'contentWindow' of null(anonymous function) @ interactiveplot.js:1
I think this has to do with the fact that I am sourcing the java script in the header which is making the java script try to access an element that has not been defined yet.
I have tried moving around the script import within the HTML. If I put it directly after the iframe Tag, I get this error message
Uncaught SyntaxError: Failed to execute 'postMessage' on 'Window': Invalid target origin 'null' in a call to 'postMessage'
I don’t know what this error means but I think it is coming from the deletePoints function.