Re: Spec for [Global] does not seem to be quite web-compatible, and none of the UAs are really compatible with each other

On 12/26/13, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 12/22/13 1:31 AM, Boris Zbarsky wrote:
>> Any other bright ideas?
>
> Cameron suggested just implementing the Safari behavior here.
> Specifically:
>
> 1)  Come up with a new extended attribute to replace
> [TreatNonCallableAsNull].  Maybe [TreatNonObjectAsNull].
>
That allows for legacy support of:
addEventListener("click", {handleEvent: function(ev) { } }, true);


> 2)  When [TreatNonObjectAsNull] is used, which would only be for event
> handlers, treat non-objects as null, but allow any object, whether
> callable or not.
>
> 3)  When invoking the event handler, just do nothing (and pretend the
> return value of the call was undefined) if the object is not callable.
>
> 4)  Leave the on* properties directly on the global.
>
> The more I think about this, the more it seems to me like the way to go.
>
> Anyone objecting?
>
Sounds good.
-- 
Garrett
@xkit
ChordCycles.com
garretts.github.io

Received on Thursday, 26 December 2013 18:35:13 UTC