[whatwg] The src-N proposal

Charles McCathie Nevile chaals at yandex-team.ru
Sat Nov 9 08:50:37 PST 2013


On Fri, 08 Nov 2013 21:41:57 +0100, Tab Atkins Jr. <jackalmage at gmail.com>  
wrote:

> On Fri, Nov 8, 2013 at 12:17 PM, Maciej Stachowiak <mjs at apple.com> wrote:
>>> On Fri, 8 Nov 2013, Rafael Rinaldi wrote:
>>>>
>>>> It looks complex because it tries to solve something complex. I think
>>>> there’s no way to avoid verbosity to solve such thing.
...
>> If you look at primitives that exist today (excluding src-N), the  
>> fundamental thing that's missing is ability to have one of several  
>> images correctly selected by the browser at preload time. Other than  
>> that, the proposed behavior can be faithfully implemented with script.
>>
>> The closest you can get today is to preload your best guess of the  
>> right image (by putting it in src and then changing with script), or  
>> preload nothing and only start loading once your script runs.
>>
>> Offhand I can't think of a way to solve the preloading problem other  
>> than with a selection syntax that can be performed by the browser.  
>> Running script before the preloader does its pass would defeat the  
>> purpose of the preloader.
>
> What Maciej said.  "Just use scripts" is, duh, the obvious answer (and
> one that people KEEP GIVING OVER AND OVER).  The problem is that this
> gates the picture loading behind a script-loading time barrier,

There is another problem, which is that requiring scripts is often far  
less friendly than providing the functionality in "basic" markup.

One approach to solving it would be to wait for people to use templates or  
something to match basic marlup to scripts and see what they choose. Which  
is slow - especially because most of the people capable of driving it will  
just choose to use bare script so we won't figure out what really works as  
markup as fast as if we were forced to pick some.

cheers


-- 
Charles McCathie Nevile - Consultant (web standards) CTO Office, Yandex
       chaals at yandex-team.ru         Find more at http://yandex.com



More information about the whatwg mailing list