Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #22397

Re: DOM attributes on listener scope chain

From Joao Rodrigues <groups_jr-1@yahoo.com.br>
Newsgroups comp.lang.javascript
Subject Re: DOM attributes on listener scope chain
Date 2013-12-25 10:23 -0200
Organization Aioe.org NNTP Server
Message-ID <l9einl$eu6$1@speranza.aioe.org> (permalink)
References <4-KdnZdprtC0sifPnZ2dnUVZ_rKdnZ2d@westnet.com.au> <3dcadb95-700a-4ae4-84d6-767eaadc3f89@googlegroups.com>

Show all headers | View raw


On 25/12/2013 01:38, Michael Haufe (TNO) wrote:
> On Tuesday, December 24, 2013 7:04:35 PM UTC-6, RobG wrote:
>> It seems that for an inline listener, the attributes of the DOM element
>> its attached to are included as variables on a kind of variable object
>> inserted as the first object on the listener's scope chain (like the
>> behaviour of _with_), e.g.
>>
>>       <button id="foo" onclick="alert(id);">Show ID</buton>
>>
>> Clicking the above button shows "foo".
>>
>> This behaviour is included in the whatWG's "HTML Living Standard"
>> section 7.1.5.1[1], which indicates that it's sufficiently well
>> supported to be considered current browser behaviour.
>>
>> Does anyone know the history of this feature? It seems little used and
>> rarely documented, I know PointedEars has looked into it in the past but
>> I can't find references.
>
> Thomas, Brendan Eich, and myself discussed this on Twitter not long ago:
>
> https://twitter.com/mlhaufe/status/405024792627007488
>

Watching Thomas repeating one of his mantras ("your argument is flawed") 
to Brendan Eich is priceless!

-- 
Joao Rodrigues

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

DOM attributes on listener scope chain RobG <rgqld@iinet.net.au> - 2013-12-25 11:04 +1000
  Re: DOM attributes on listener scope chain "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-12-24 19:38 -0800
    Re: DOM attributes on listener scope chain Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2013-12-25 10:23 -0200
    Re: DOM attributes on listener scope chain RobG <rgqld@iinet.net.au> - 2013-12-26 09:49 +1000
    Re: DOM attributes on listener scope chain RobG <rgqld@iinet.net.au> - 2013-12-26 11:05 +1000
  Re: DOM attributes on listener scope chain "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-12-24 19:47 -0800
    Re: DOM attributes on listener scope chain Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-12-25 22:42 +0100
      Re: DOM attributes on listener scope chain "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-12-25 13:52 -0800
  Re: DOM attributes on listener scope chain Andreas Bergmaier <andber93@web.de> - 2014-01-07 19:27 +0100
    Re: DOM attributes on listener scope chain Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-07 19:42 +0100

csiph-web