The final piece of the offline reading workstream — a downloaded EPUB reads with no network, images included.
epub-offline-resource-rewriter (pure module): rewrites each epub-resource?file=X URL in already-sanitized page HTML to a blob: URL from the offline store. Runs post-sanitize because DOMPurify strips blob: URIs; uncached resources keep their original URL (online unaffected); returns every created object URL so the caller can revoke them.
epub-reader: when !navigator.onLine, loadPage/loadChapters resolve from the offline store (page + TOC) with a cache fallback. safeHtml is now set by an async render effect that applies the resource rewrite when offline and revokes the previous page's blob URLs on each render and on destroy (no leaks). The online path is unchanged (synchronous cache/network).
The final piece of the offline reading workstream — a downloaded EPUB reads with no network, images included.
- **`epub-offline-resource-rewriter`** (pure module): rewrites each `epub-resource?file=X` URL in already-sanitized page HTML to a `blob:` URL from the offline store. Runs **post-sanitize** because DOMPurify strips `blob:` URIs; uncached resources keep their original URL (online unaffected); returns every created object URL so the caller can revoke them.
- **epub-reader**: when `!navigator.onLine`, `loadPage`/`loadChapters` resolve from the offline store (page + TOC) with a cache fallback. `safeHtml` is now set by an async render effect that applies the resource rewrite when offline and **revokes the previous page's blob URLs** on each render and on destroy (no leaks). The online path is unchanged (synchronous cache/network).
Unit-tested: rewriter (no-op / rewrite+track / keep-uncached / dedup) + epub-reader offline store-first read (no network) alongside the existing 43 online tests.
Completes the reader offline feature (with the store #651, download service, download button #653, profile section #654, PDF-offline #655).
PR: spikersoft-angular `feat/reader-offline-epub-read`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The final piece of the offline reading workstream — a downloaded EPUB reads with no network, images included.
epub-offline-resource-rewriter(pure module): rewrites eachepub-resource?file=XURL in already-sanitized page HTML to ablob:URL from the offline store. Runs post-sanitize because DOMPurify stripsblob:URIs; uncached resources keep their original URL (online unaffected); returns every created object URL so the caller can revoke them.!navigator.onLine,loadPage/loadChaptersresolve from the offline store (page + TOC) with a cache fallback.safeHtmlis now set by an async render effect that applies the resource rewrite when offline and revokes the previous page's blob URLs on each render and on destroy (no leaks). The online path is unchanged (synchronous cache/network).Unit-tested: rewriter (no-op / rewrite+track / keep-uncached / dedup) + epub-reader offline store-first read (no network) alongside the existing 43 online tests.
Completes the reader offline feature (with the store #651, download service, download button #653, profile section #654, PDF-offline #655).
PR: spikersoft-angular
feat/reader-offline-epub-read.Verified complete: spikersoft-angular PR #229 merged ('read downloaded EPUBs offline + blob-URL resource rewriter'); epub-reader carries the offline/blob-URL handling on master. Closing.