Javascript for degradation [ Re: [whatwg] Suggested changes to Web Forms 2.0, 2004-07-01 working ]

Matthew Raymond mattraymond at earthlink.net
Tue Jul 20 09:09:36 PDT 2004


Jim Ley wrote:
>>>No, but we're excluding a solution because it cannot be done in HTC's
>>
>>   Actually, I've tested <object> in IE, and the <object> element in my
>>test didn't show up in the DOM using straight JScript, so I fail to see
>>what HTC even has to do with it.
> 
> you can provide the enhancement in other ways, such as inline script
> within the OBJECT element.

    Wouldn't such an inline script require <script>? That would mean for 
every <object> element, you'd require the web author to remember to put 
in a <script> element.

> This isn't possible with HTC's, I've
> already demonstrated an appropraite markup to allow for HTC support
> too.

    No, I don't think you did. All I saw was the contents of an <object> 
element wrapped in a <div>, with no explanation of what it was supposed 
to do. I presume you want a script to look for that <div> and implement 
behaviors accordingly, but that still doesn't give you the |form| 
attribute and other WF2 control-related attributes from the <object>.

>>>- that's my problem, even though HTC's are sub-optimal for the
>>>majority of situations (look at the two proposed examples, neither use
>>>HTC's)
>>
>>   Proposed examples?
> 
> http://whatwg.org/demos/
> 
> [javascript...]

    Of course. We haven't written the HTC yet, and may I point out that 
the Javascript does not perform everything WF2 does. It's only there as 
something for non-WF2 clients to gracefully degrade to. WF2 doesn't 
forbid Javascript a web page's in legacy user agent support.

>>   I'll defer to Dean on this one, as he is the expert.
> 
> He is _an_ expert, you know what, there are other people who have
> experience in HTC's in the world you know.

    Thank you for demonstrating just how little you often bring to the 
conversations on this mailing list. I should not have to defend every 
trivial choice of an article (a, the, et cetera).

>>http://listserver.dreamhost.com/pipermail/whatwg-whatwg.org/2004-July/001205.html
> 
> This appears to be a comparison between object and datalist, rather
> than a general discussion on Object.

    Clearly, if <object> is not better than <datalist>, it should not be 
used in its place. If <object> is an inferior solution, it doesn't 
matter how you'd implement it in IE.

>>>(so you'd need the DIV for the HTC solution, whereas the inline script
>>>wouldn't need the extra element)
>>
>>   Perhaps you should give us a HTML+Javascript example,
> 
> no time I'm afraid, I feel there's more than enough there for anyone
> with any javascript experience - you don't even need to be competent -
> to create an example.

    I'm not going to argue your points for you, especially when I don't 
understand what they are. Furthermore, if this code takes up so much of 
your precious time, why do you expect us to have time to do it for you?



More information about the whatwg mailing list