Purpose of referrer

referrer supplies the URL context used to resolve src. A relative src is resolved against that URL, while a module-path src uses it to select the matching import-map scope. An absolute src remains unchanged.

The referrer may itself be a relative URL, module path, or absolute URL. It changes URL resolution only; it does not enter another component's local module-map context. Use referrer-selector when resolution must use the context owned by a rendered descendant component.

See also

Module URLs and component referrers