Make <embed> and <object> behave more like <iframe> for image loading.

Skip to first unread message

Andreas Farre

Jun 29, 2022, 11:40:09 AMJun 29
to dev-platform
I'm currently working on implementing Opaque Response Blocking (ORB),
and one part I'm going to try out is to have <embed> and <object>
elements load images in synthetic documents, just like how <iframe>
does ( This makes
the ORB implementation simpler, since I can then handle cross origin
requests just like how we do process switching for cross origin

This is not really how spec describes image loading for <embed> and
<object>, but initially I will try to adhere to spec as much as
possible, but there's also discussions changing the spec

This is currently in review at and I'm hoping to
land it soon. The number of tests that I've needed to change have
turned out to be fairly low, and hopefully the
visibility of this change to web pages should be minimal.

One place where there will be a known observable difference is in
DevTools, where there now will be a browsing context/document as a
child to either the <embed> or <object> element.

My intention is to have this turned on for Nightly only, with prefs in
place to quickly have it turned off. That pref is:


I've also added a bonus pref that depends on the previous to turn off
the spec adhering hacks (essentially to hide browsing contexts from
`Window.frames`, named targeting etc). That pref is:


Since this is a bit on the experimental side, I'd be very happy if I
could have your help to keep extra eyes on any breakage that happens
due to this. I'll make sure to send a follow-up as soon as I land
this. Opinions before landing are of course also welcome!

Reply all
Reply to author
0 new messages