I am searching for any html 5 tag that can be used to import a whole html document to my another document as I want to use it in my given JS code...
I already know about <embed>
, <object>
and tried them in the code but it seems that it can't use the sources of original document which I want to use...
The following is my JS function in which I plan to use html 5 tag...
function changeME(element) {
document.querySelector(".changing_component").innerHTML = '<object type="text/html" data="./components/'+element+'.html" style=\"overflow:hidden; width: 99.25%; height: 101%\" width=\"100%\" height=\"101%\"" ></object>';
}
The expected output would be the working of the html document content with using the sources of the parent document.