[whatwg] Scripting Tweaks

Ian Hickson wrote:
> On Wed, 20 Apr 2005, Dean Edwards wrote:
> 
>>1) Mozilla's DOMContentLoaded event is very handy.
> 
> Good idea.
> 
>>2) I'd like to be able to lock/disable an entire document. This is 
>>useful when submitting to hidden frames. It helps prevent users from 
>>re-submitting data before it has been processed. Ideally, I could 
>>disable an entire frameset. Better yet, I can display some kind of 
>>visual feedback so that the user knows the page is locked (e.g. 
>>hourglass, greyed out content).
> 
> 
> Not sure I follow here. I frequently post a form then keep browsing the 
> page while the next one loads, opening links in the background. I don't 
> want pages stopping that. :-)
> 
> You can disable the submit button (indeed maybe UAs should just do that 
> by default), would that do it?
> 

Not really. There may be more than one submit button. Also, if the 
submit button has a value associated with it then that value wouldn't be 
submitted. The use case is a web app that submits data to a hidden 
iframe. This is common in JSP type backends. The hidden frame then 
updates the page with new data. Maybe this is just me working on 
projects that are designed wrong! Anyone else encounter this scenario?

> 
> 
>>3) I find myself using Microsoft's uniqueID property quite often. 
>>Although the ID attribute is supposed to provide a unique identifier, it 
>>often doesn't. We would probably need a complementary DOM method to 
>>retrieve an element by uniqueID (IE uses the "all" property).
>>
>>http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/uniqueid.asp
> 
> 
> Interesting. What's the use case?
> 

I can't think of one off the top of my head but I do find myself using 
it. It's certainly handy for passing string references around rather 
than object references.

> 
> 
>>4) It would be handy to have the following DOM properties:
>>
>>childElements
>>firstChildElement
>>lastChildElement
>>previousElement
>>nextElement
>>parentElement
> 
> Way ahead of you:
> 
>    http://whatwg.org/specs/web-apps/current-work/#navigating
> 
> But in general I think NodeIterator would be better.
> 

Oops. Haven't looked at the spec in a while. Naughty me. ;-)

-dean

Received on Wednesday, 20 April 2005 07:31:53 UTC