/** Returns a trimmed URL safe for an ``/`` `src`, or `null`. * Relative URLs and `http:`, `https:`, `blob:`, and `data:` are allowed. The * platform parser performs the same control-character normalization as DOM * URL sinks, preventing obfuscated schemes such as `java\tscript:`. */ export declare function safeMediaSrc(url:unknown,URLCtor?:typeof URL):string|null; /** Returns a trimmed URL safe to pass to `fetch()`, or `null`. This shares the * resource allowlist with media sources so text/image `data:` URLs remain * usable, while navigation-only and executable schemes are rejected. */ export declare function safeFetchUrl(url:unknown,URLCtor?:typeof URL):string|null; /** Returns a trimmed URL safe for a *navigation* ``, or `null`. * `http:`, `https:`, `blob:`, `mailto:`, and relative URLs are allowed. * `data:` is intentionally excluded because following it can open an active * document; `mailto:` is allowed because it hands off to the mail client * rather than navigating a document. Use `safeDownloadHref()` instead for an * anchor that retrieves a resource (one carrying a `download` attribute). */ export declare function safeLinkHref(url:unknown,URLCtor?:typeof URL):string|null; /** Returns a trimmed URL safe for a *download/open* `` pointing at a * resource, or `null`. `http:`, `https:`, `blob:`, and relative URLs are * allowed. This is `safeLinkHref()` minus `mailto:`: a mail handoff names no * retrievable bytes, so pairing it with a `download` attribute is meaningless. * The allowlist is a strict subset of `safeMediaSrc()`'s, so a URL that fails * the media-src check necessarily fails this one too. */ export declare function safeDownloadHref(url:unknown,URLCtor?:typeof URL):string|null; /** Returns a trimmed URL safe to navigate an active document to -- an `` or a full * page navigation -- or `null`. Only `http:`, `https:`, and relative URLs are allowed; this is * the narrowest allowlist in this module; see the scheme-set comment above for why `data:`, * `blob:`, and `mailto:` are each excluded here even though one or more of the other sinks in * this module allow them. */ export declare function safeDocumentNavigationUrl(url:unknown,URLCtor?:typeof URL):string|null; /** Returns a trimmed URL safe for an ``, or `null`. An alias of * `safeDocumentNavigationUrl()` named for its most common caller (``'s sandboxed * frame); the two names share one implementation because the underlying question -- "may this * become an actively-navigated document?" -- is identical for both callers. */ export declare function safeFrameSrc(url:unknown,URLCtor?:typeof URL):string|null;