I use the following to open new tab (in new process) with some page content,
var p = document.getElementById("myElement");
var a = document.createElement('a');
When you use this code it always open new tab,
I want that when you call to this code it will see if it was a previous call that open in new tab,then it will close it and the new call will be opened in new tab.
or maybe to run the new page in the previous tab without close it.
I cannot use the regular window.open API's ...