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

On Thu, Jan 9, 2014 at 1:02 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 1/9/14 12:54 PM, Erik Arvidsson wrote:
>
> > I'm in favor of the IE/Safari behavior.
>
> Sounds good.  I'll work on updating the spec accordingly.
>
>
>  However, I don't want us to introduce a new extended attribute for this.
>>
>
> We already have [TreatNonCallableAsNull], which is only used by event
> handlers so far.  I plan to just change its behavior and rename to
> [TreatNonObjectAsNull], not introduce any new weirdness we don't already
> have.


My bad. I was referring to a different thread where someone (you?) wanted
to move everything off of Window.prototype to the window instance. Let me
find that thread and comment there.


>
>
>  If people use prefixed code incorrectly in a global scope I'm
>> willing to break them in the name of saner web platform.
>>
>
> I'll believe it when I see Blink actually removing some of the prefixed
> properties in question.  We tried that in Gecko, and ended up with
> widespread breakage, such that we could not ship the change.  I'm not
> willing to experiment with that again, given the amount of time that was
> wasted previously and my low estimate of the chance of ever being able to
> ship such a change.
>
> Further, this is a problem for common polyfill techniques too, not just
> prefixes...


Remember that it is only an issue in global code. The following works fine:

(function() {
  var requestAnimationFrame = window.mozRequestAnimationFrame ||
window.requestAnimationFrame;
  ...
})();


-- 
erik

Received on Thursday, 9 January 2014 18:08:50 UTC