Skip to content

Comments

Generic embeds failing on chromium - switch to blob#952

Draft
rchlfryn wants to merge 9 commits intomainfrom
embed-donate
Draft

Generic embeds failing on chromium - switch to blob#952
rchlfryn wants to merge 9 commits intomainfrom
embed-donate

Conversation

@rchlfryn
Copy link
Collaborator

@rchlfryn rchlfryn commented Feb 18, 2026

Description

Fix embedded scripts (e.g., Donorbox donation form) not loading after client-side navigation on Chromium browsers. Chromium does not re-execute scripts in srcDoc (about:srcdoc) iframes when the iframe is recreated during SPA navigation. Switching to blob URLs forces a real document navigation, ensuring scripts execute fresh every time.

Related Issues

#816

Key Changes

  • Replace srcDoc with src={blobUrl} on the GenericEmbed iframe
  • Create a unique blob URL per mount via URL.createObjectURL, revoked on unmount

How to test

  1. Navigate to a page with a GenericEmbed block containing a script (e.g., Donorbox donate page)
  2. Verify the widget loads on first visit
  3. Navigate away via a site link, then navigate back
  4. Verify the widget loads again on Chrome
  5. Verify the widget still works on Firefox and Safari

@github-actions
Copy link

Preview deployment: https://embed-donate.preview.avy-fx.org

…execute a static <script> tag from parsed HTML
@rchlfryn rchlfryn changed the title Chrome caching embeds Generic embeds failing on chromium Feb 19, 2026
@rchlfryn rchlfryn changed the title Generic embeds failing on chromium Generic embeds failing on chromium - switch to blob Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant