David,

As per the spec, DOM bindings build a special context chain for that,
see 
http://codesearch.google.com./codesearch/p?hl=en#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/bindings/v8/V8LazyEventListener.cpp&q=%22with%20(%22%20file:bindings/v8&l=112
for more details.

hth and yours,
anton.

On Tue, Mar 29, 2011 at 10:34 PM, David Xanatos
<[email protected]> wrote:
> When I am in a event like onlaod="alert('bla'); this.alert('blup')"
> the this is not longer 'window' but the html object the event is in.
> But strangely I call call any alert and use document as if the global
> object still would be the window, but alert(window == this) tells me
> false :/
>
> I would like to use this behavioure in a V8 C++ project, so i wanted
> to ask how is this "superopsition" of the global object with an other
> object achieved?
>
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
>

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to