[whatwg] <object> behavior

Michael A. Puls II shadow2531 at gmail.com
Tue Sep 22 09:33:01 PDT 2009


On Tue, 22 Sep 2009 11:42:25 -0400, Tab Atkins Jr. <jackalmage at gmail.com>  
wrote:

> On Mon, Sep 21, 2009 at 5:26 PM, Michael A. Puls II
> <shadow2531 at gmail.com> wrote:
>> On Mon, 21 Sep 2009 16:30:29 -0400, Boris Zbarsky <bzbarsky at mit.edu>  
>> wrote:
>>>> Of course, if the idea is to support deferring for images, <object>  
>>>> and
>>>> <embed> etc. and it's not desired that that support be given through
>>>> css, perhaps there should be some attribute that does that. <img
>>>> disabled> <object disabled> <embed disabled> etc. where .disabled =
>>>> false brings them alive.
>>>
>>> I would prefer something like this.  Using CSS for this purpose seems
>>> wrong.
>>
>> Sounds good. If it is an attribute, I wonder what would be a good name.
>> 'disabled' might be likely to conflict with some plug-in param and might
>> conflict with <object> and <img> when they are form controls.
>
> The obvious answer seems to be to use @hidden, which indicates that
> the element is not currently relevant and should not be displayed.

O.K., so <object hidden> would prevent the <object> from being evaluated.  
That would mean that nothing will load in it (plug-in, image or document  
etc.) and nothing in @data would be fetched.

Then, if you remove @hidden or do .hidden = false, the <object> would be  
evaluated and things would be fetched and loaded depending on @type and  
@data etc.

Then, if you set @hidden or do .hidden = true, the plug-in instance or  
document (caches aside) would be destroyed and the <object> would be  
hidden again and be back to its declared-only state.

Finally, a hidden object would obviously not be shown visibly , but would  
also take up zero space.

I guess it could be @noeval instead of @hidden if you like @noeval better.

-- 
Michael



More information about the whatwg mailing list