I'm generating a iframe and filling it with a div and a d3 script to render the svg content inside it. Something like:
<iframe id="content-frame"">
<head></head>
<body>
<div id="target"></div>
<script> ... d3 code here ... </script>
</body>
</iframe>
Inside the D3 script I have the usual select:
d3.select("#target").append("svg")...
but it doesn't add the svg inside the div.
If I run d3.select("#content-frame").append("svg")
instead it places the svg correctly inside the iframe though.
I've tried d3.select("#content-frame #target").append("svg")
and similar selectors without success.
Any idea?
Thanks!.