Open jakemac53 opened 9 years ago
good point - at least when searching for pre-existing imports, we could limit it to just the ones that exist at the time the initializers start running (rather than checking those that exist at the time you are injecting a new import)
Ya, we don't have any good hooks for that but we could do it when the first HtmlImport is found and then cache it at that point.
Currently the mirror based version of @HtmlImport leaves deduplication up to the browser. This may actually be fine, but it could end up outputting some pretty gross html with lots of duplicate tags. It might not be worth actually searching the document for pre-existing html imports (probably more work overall) but we should at least keep a static set of the assets we have already injected and not re-inject those.