[whatwg] 'hidden' as resources control (Was: Simplified <picture> element draft)

Tab Atkins Jr. jackalmage at gmail.com
Thu Jan 23 19:05:10 PST 2014

On Thu, Jan 23, 2014 at 6:13 PM, Bruno Racineux <bruno at hexanet.net> wrote:
> On 1/22/14 6:07 PM, "Boris Zbarsky" <bzbarsky at MIT.EDU> wrote:
>>On 1/22/14 8:14 PM, Bruno Racineux wrote:
>>> Meanwhile, is there a way in which all vendors can prevent their
>>> pre-loaders from preloading (and loading at all for that matter) any
>>> that has either: An html5 hidden attribute
>>This is feasible.
>>> or display:none
>>This is not really.  The preload scanner has no idea bout styles.
> Then how come it is the case right now for both:
> <object style="display:none" data="image.png">
> As well as:
> <head>
> <style>
> .dn { display:none; }
> </style>
> <head>
> <body>
> <object class="dn" data="image.png">
> <body>
> Not only the pre-loader doesn't load the data-src
> but "image.png" doesn't actually load at all.

You're assuming that <object> preloads at all.

Boris isn't saying that making the preload scanner care about styles
is a bug, he's saying it's *impossible* (unless your "preload scanner"
triggers so late as to be a "literally-just-before-load scanner").


More information about the whatwg mailing list