From a82dc8d3f121a9745c0952b01507d46e157494aa Mon Sep 17 00:00:00 2001 From: Umputun Date: Sat, 22 Aug 2026 03:09:40 -0500 Subject: [PATCH] Restore the legacy /web/*.js URLs and fix iframe reuse (#2192) * Serve the legacy /web/*.js names from their .mjs siblings The build emitted .js alongside .mjs until the two compilations were collapsed into one. Dropping the second compilation was right, but it removed URLs the project itself had published: the v1.16.4 SPA documentation named /web/embed.js directly and its loader snippet requested .js. Pages that hard-coded those names now 404 with no deprecation. webFiles.Open retries a missing .js against the .mjs sibling. The bundles contain no import or export, so the same bytes serve both names. The retry runs only once both sources report the name missing, so a real .js still wins, and an unreadable sibling reports its own error rather than being flattened into the requested file's 404. Related to #2178 * Reuse only the comments iframe embed created createInstance took root.firstElementChild as its iframe, so anything a page left inside #remark42 was adopted instead. A