Custom element that lets you load template from external file into your document, and take full control over loaded <script>s and <link rel="import">s. Thanks to HTML Imports - caching, script execution, etc. is completely native. Declarative way for client-side includes boosted with HTML Imports features.
Currently when another <imported-template> instance for same url is attached to DOM we create new <link> element. Luckyli it does not hit the networking performance, as according to HTML Imports spec it will not download it again, however we just pollute <head>.
We could just keep map of already imported templates, to match url with already processed tempalte, ready to get stamped.
Currently when another
<imported-template>
instance for same url is attached to DOM we create new<link>
element. Luckyli it does not hit the networking performance, as according to HTML Imports spec it will not download it again, however we just pollute<head>
.We could just keep map of already imported templates, to match url with already processed tempalte, ready to get stamped.