Is there any way to create gojs diagram by passing the whole element instead of just id inside this code
Explanation
I have an iframe (id=“salesforce_iframe”) which further contains an div (id=“div_gojs_chart_depedency_map”). Now i want to create gojs diagram on "divmydiagram "
To access a div inside iframe I have to use this code
var iframe = document.getElementById("salesforce_iframe");
var element_diagram = $(iframe.contentWindow.document.querySelectorAll("#div_gojs_chart_depedency_map"))
GOJS documentation tell that you need to pass id to create a diagram I just cannot pass id because it is inside an iframe and throws me an error = “Error handling response: Error: Invalid DIV id; could not get the element with id: div_gojs_chart_depedency_map”
How do I pass this element variable element_diagram instead of div “div_gojs_chart_depedency_map” or is there any other way