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

On Thu, Jan 23, 2014 at 6:13 PM, Bruno Racineux <bruno@hexanet.net> wrote:
> On 1/22/14 6:07 PM, "Boris Zbarsky" <bzbarsky@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
>>><img>
>>> 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").

~TJ

Received on Friday, 24 January 2014 03:05:59 UTC