Context in which the URL is being resolved.

This is useful to specify for applications which wish to base64-encode contents of certain local files referenced by URLs, e.g. images, short videos, or CSS styles. Because base64-encoding is not advisable or even impossible for some combinations of tags and attributes, the resolving function needs know both the tag and the attribute to decide whether to base64-encode or not. For example, passing encoding contents to href in the <link> context can be used to provide CSS styles, but doing the same for href in <a> context URL will prevent navigation.

interface IResolveUrlContext {
    attribute?: UrlAttributes;
    tag?: TagsAcceptingUrls;
}

Properties

Properties

attribute?: UrlAttributes

Attribute for which the URL is being resolved.

tag?: TagsAcceptingUrls

Tag for which the URL is being resolved, e.g. a or img.