- From: Shiino Yuki <notifications@github.com>
- Date: Tue, 24 Oct 2017 23:22:50 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 25 October 2017 06:23:32 UTC
In Blink, [`V8AbstractEventListener::InvokeEventHandler`](https://cs.chromium.org/chromium/src/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp?q=V8AbstractEventListener::InvokeEventHandler&sq=package:chromium&l=120) does the trick. Roughly speaking, every time that Blink dispatches an `Event`, Blink puts each `Event` on stack (note that it's possible that event handling is nested), and the latest `Event` is associated with global object's `event` attribute (internally Blink is using a V8's private property for this purpose). This is true not only for Window but also Worker/Worklet. In [`V8AbstractEventListener::InvokeEventHandler`](https://cs.chromium.org/chromium/src/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp?q=V8AbstractEventListener::InvokeEventHandler&sq=package:chromium&l=120), you see `saved_event` and `V8PrivateProperty::GetGlobalEvent`. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/334#issuecomment-339227076
Received on Wednesday, 25 October 2017 06:23:32 UTC