Skip to content

Conversation

@vinhill
Copy link
Contributor

@vinhill vinhill commented Jan 30, 2026

Description

Quoting from the change:

The initial about:blank document now loads synchronously. A browsing context's first navigation may resolve to about:blank (for example, when the initial URL is empty or explicitly set to about:blank). In these cases, Firefox no longer replaces the initial empty document with a second, asynchronously loaded one, and instead fires the load event synchronously on the initial document.

Motivation

Changing the timing of about:blank loads solves a long-standing web-compat issue. But we've seen web pages or addons break, so developers might want to know about this change.

To name some examples of what changed:

  • window.open("about:blank").onload = handler the handler won't run anymore because load already fired
  • The same with ifr = document.createElement("iframe"); document.body.append(ifr); ifr.onload = handler;
  • If an empty iframe is appended and synchronously removed, declarative extension content scripts could execute in it anyway.
  • ifr = document.createElement("iframe"); ifr.onload = handler; document.body.append(ifr); ifr.src = other will observe two load events now because src was set too late.

Related issues and pull requests

@vinhill vinhill requested a review from a team as a code owner January 30, 2026 14:30
@vinhill vinhill requested review from pepelsbey and removed request for a team January 30, 2026 14:30
@github-actions github-actions bot added Content:Firefox Content in the Mozilla/Firefox subtree size/xs [PR only] 0-5 LoC changed labels Jan 30, 2026
@github-actions
Copy link
Contributor

Preview URLs (1 page)

External URLs (1)

URL: /en-US/docs/Mozilla/Firefox/Releases/148
Title: Firefox 148 release notes for developers (Beta)

@pepelsbey
Copy link
Member

Hey! Thank you, it looks very good. The only question I have is about the section. Looking back to how we used the HTML section, it usually has something to do with markup, elements, attributes, etc.

This change looks a bit different. More like API or DOM. Would you consider other sections for this change?

@vinhill
Copy link
Contributor Author

vinhill commented Jan 30, 2026

Hey!
I think HTML is the better fit as this is about the document/navigation lifecycle. I only see DOM as subsection of API and this is not an API change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Firefox Content in the Mozilla/Firefox subtree size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants