Importing needs to be manipulated by script. But it's too verbose to use script always.

If link tag can be inserted in body tag, and inserts importee's document.body to importer, then it would be easily without any scripts.

An example is below:

component.html:
<!DOCTYPE html>
<div>
    <p class="name">Hong Gildong</p>
    <p class="age">20</p>
</div>


index.html:
<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Human Being</title>
    </head>
    <body>
        <link rel="import" href="component.html">
    </body>
</html>


Reply via email to