ProcessFrameContext
Summary
The parsed, detached HTML and references available to a custom prefetch hook.
Signature
interface ProcessFrameContext {
assets: readonly Element[]
element: Element | undefined
fragment: DocumentFragment
frames: readonly PrefetchFrameReference[]
response: Response
signal: AbortSignal
src: string
target: string | undefined
}
Properties
assets
Original script and link declarations supported by native prefetch hints, including inside
templates. Responsive image and track preloads are omitted; query fragment for custom loading.
element
First caller's live triggering element. Nested requests inherit it, and later callers joining shared work do not replace it. It may be disconnected or point elsewhere while another caller retains the work.
fragment
Inert HTML fragment, including templates; it is never mounted by Remix.
frames
All discovered same-origin nested frame requests, resolved against the response's base URL.
response
Original response, whose body has been consumed into the fragment.
signal
Same as this frame's fetch init.signal; aborts when all callers cancel or runtime is disposed.
src
Requested absolute frame source URL.
target
Destination frame name, when provided.