I got a html file like this,
//some content
//some content
You can use element with
rel
attribute set to import
, href
set to path to file, type
set to "text/html"
. Use XMLSerializer()
instance .serializeToString()
with replacement document
.doctype
property as parameter to get declaration from imported
document
; document.write()
with .import.documentElement.outerHTML
property of link
element as parameter to replace existing .doctype
and node with
.doctype
and of imported
document
.
//original content