there is such code (file index.html):

<!DOCTYPE HTML> <html> <body> <script> function show() { var time = link.import.querySelector('*'); document.body.appendChild(time); }; </script> <link rel="import" id="link" onload="show()" href="timer.html"> </body> </html> 

and the timer.html file:

 <h2>Some test from "timer" file</h2> 

In general, importing the timer.html file to index.html in Firefox 44.0.2 does not work, and everything is working fine in Opera and Chrome. Can someone come across a similar one and know how to resolve the situation and make the code work?

    1 answer 1

    So I ran into the same problem. And the reason is simple in FireFox support for HTML Imports is disabled. referring to https://developer.mozilla.org/en-US/docs/Web/Web_Components/HTML_Imports