I am facing an issue with a dynamic page that has the ability to change its main div
content using a bar button. The pages are mostly static except for one which contains JavaScript (RGraph charts).
To make it work, I am currently using the following code:
var data = new FormData();
data.append( 'action', 'charts' );
// clean the content
var myNode = document.getElementById("contentView");
while (myNode.firstChild)
{
myNode.removeChild(myNode.firstChild);
}
// set the new content
var div = document.createElement("div");
var t = document.createElement('template');
t.innerHTML = _connectToServer( data );
for (var i=0; i < t.content.childNodes.length; i++)
{
var node = document.importNode(t.content.childNodes[i], true);
div.appendChild(node);
}
document.getElementById("contentView").appendChild(div);
The problem I encountered is that this code seems to be incompatible with Microsoft Edge, and I am looking for ways to make it compatible with Edge as well.
What is the recommended solution to resolve this compatibility issue?