this would make some use cases where HTML is already parsed and that HTML may already have had its own importmap:
browser extensions that inject code into an already-running app (the app may have its own importmap).
code splitting, where different routes/pages of a dynamically-loaded app only need to load certain scripts on certain pages. If there are many dependencies, an importmap could be long. Instead, the top level import for a desired page
handling duplicate libs in different parts of an app lazily
loading parts of an app dynamically using dependencies that are unknown up front and the importmap is sent to the client depending on a user's actions
being able to easily prototype, for example copy/paste an importmap from https://generator.jspm.io/ into your import() statement in devtools console for quickly experimenting with ideas
It would be useful to be able to do this:
this would make some use cases where HTML is already parsed and that HTML may already have had its own importmap:
import
for a desired pageimport()
statement in devtools console for quickly experimenting with ideas