Removing src attribute from iframe should load about:blank in it

RESOLVED FIXED in Firefox 65

Status

()

enhancement
RESOLVED FIXED
8 months ago
6 months ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

({dev-doc-complete})

Trunk
mozilla65
Points:
---

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(1 attachment)

See https://html.spec.whatwg.org/multipage/iframe-embed-object.html#otherwise-steps-for-iframe-or-frame-elements step 1.

It looks like we don't even run https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes on src attr removal.  Testcase:

  <iframe src="data:text/html,A  test"></iframe>
  <div onclick="document.querySelector('iframe').removeAttribute('src');">
    Click me
  </div>

Chrome and Safari both load about:blank in this case.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #9025836 - Flags: review?(amarchesini) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/60639eb34a6d
Removing an src attribute from an iframe should load about:blank in it.  r=baku
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/deefae2125c4
Fix tab/space lint failure on a CLOSED TREE
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/14141 for changes under testing/web-platform/tests
https://hg.mozilla.org/mozilla-central/rev/60639eb34a6d
https://hg.mozilla.org/mozilla-central/rev/deefae2125c4
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Upstream PR merged
Note to MDN writers' team:

I've added a note about this to the Fx65 rel notes:
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/65#HTML

I don't think there is a lot of docs work to do here, but you might want to add a note about this somewhere on the <iframe> reference page.

I've added a note about this to the src information at
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#Attributes
https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement#Properties

I'm not sure if this needs a specific entry in the browser compatibility data?

You need to log in before you can comment on or make changes to this bug.