You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using 'active script' to determine the scope for a particular import: URL seems to break down easily when passing URLs from scripts in one scope to scripts in another:
If caller.js and lib.js are in separate scopes, but the deciding factor for which scope applies to a particular import: URL is based on the 'active script' at the time the import: URL string would be consumed for resolution, then import:somewhere/image.png would be resolved in scope A, used by lib.js, rather than scope B. How can a caller one scope provide an import: URL to another scope that resolves to the network URL expected by the caller?
I think this would require some kind of URL resolution function ("import.resolve") but doing so seems to be currently precluded by other problems (CORS, async).
The text was updated successfully, but these errors were encountered:
(relevant text: https://github.com/domenic/import-maps/blob/e4dd5e3b070ca5bd56bf65bfa01085045207a52c/spec.md#modifications-to-the-url-parser-for-import-urls)
Using 'active script' to determine the scope for a particular
import:
URL seems to break down easily when passing URLs from scripts in one scope to scripts in another:./lib.js
, in scope A:./caller.js
, in scope B:If
caller.js
andlib.js
are in separate scopes, but the deciding factor for which scope applies to a particularimport:
URL is based on the 'active script' at the time theimport:
URL string would be consumed for resolution, thenimport:somewhere/image.png
would be resolved in scope A, used bylib.js
, rather than scope B. How can a caller one scope provide animport:
URL to another scope that resolves to the network URL expected by the caller?I think this would require some kind of URL resolution function ("
import.resolve
") but doing so seems to be currently precluded by other problems (CORS, async).The text was updated successfully, but these errors were encountered: