Consider the test case in https://github.com/w3c/web-platform-tests/pull/4088, which:
1. Creates a form in frames[0]
2. Appends it to frames[1].document.body
3. Calls frame0Form.reset()
The reset() algorithm says to "fire an event named reset at _form_". The question is: what realm should the resulting Event object be created in? That is, is event.constructor frames[0].Event, or frames[1].Event, or even window.Event?
We recently realized this was underspecified and specced the relevant realm of the event target: in this case, frame0Form, whose relevant realm is frames[0], so it should be frames[0].Event. This seems like the natural choice.
Chrome however chooses frames[1]. Maybe its heuristic is to choose the relevant realm of the node document of the target? But this doesn't make sense for non-Node EventTargets, like IndexedDB objects, so it seems like a bad heuristic.
I think we should update to match the spec, but am open to changing the spec too, if we have good reason. I realize we didn't get a full discussion from Chrome developers when merging the spec change. That discussion was at https://github.com/whatwg/dom/issues/352, and my testing was faulty at the time, which is why I didn't consult with anyone from Chrome. Let me know.
Comment 1 by hayato@chromium.org
, Nov 14 2016