[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: KJS no studlyCaps event handlers [PATCH]
From:       Peter Kelly <pmk () post ! com>
Date:       2001-08-06 13:47:51
[Download RAW message or body]

Harri Porten wrote:

> On Sun, 5 Aug 2001, Harri Porten wrote:
> 
> 
>>>With this patch, we drop tolerance in favour of compatibility and "standard 
>>>compliance".
>>>
>>Using a 'plower' that contains a lower case variant would make the patch
>>smaller. Of course, this would also match e.g. "oNlOad" ... 
>>
>>
>>>Will commit.
>>>
>>Hopefully with -R ;)
>>
> 
> Ah ! Now I get it. Didn't know that somebody had already committed
> onload/onLoad flexibility and your patch aims at *removing* them. Now I
> understand what you meant :}
> 
> Have you tried whether other browser do in terms of case insensitivity if
> you assign an event handler like window.on[lL]oad = function() { ... } ?
> 
> Harri.
> 
> 
> 

The real situation was kind of but not quite like what we had before the 
patch. NS4 actually supports setting onload and onLoad from javascript 
and one of these will get executed depending on what is set. However, 
when you set it with an attribute (e.g. <body onload="...">) it's onload 
that gets set, not onLoad. So they are essentially two different 
variables, where as we were treating them as one.

IE appears to only support the lowercase versions, so in that case I am 
happy with the patch.

Even so, this still hides the more serious issue where we can crash due 
to recursion (NS4 does this too BTW). This is something to fix at the 
kjs level, I had a partially working fix at one stage but don't have the 
patch handy.


-- 
Peter Kelly
pmk@post.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic