Bug 2022763 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

It's about the realm of `event.target.files[0]`. The input element is inside the main page, but we call the event listener with an iframe realm. That's same on Chrome too. The problem is that Chrome makes the realm of `event.target` and `event.target.files[0]` be same, but not on Firefox.
It's about the realm of `event.target.files[0]`. The input element is inside the main page, but created from an iframe, so `e.target instanceof Element` is true inside iframe. But as we transplant the element to the parent page, we also change the prototype of the element (see bug 1470017). 

We call the event listener within the iframe realm. The problem is that Chrome makes the realm of `event.target` and `event.target.files[0]` be same (using the realm of the iframe page) but on Firefox we use the realm of the main page. So `instanceof` check in the iframe fails against `instanceof File`.

Back to Bug 2022763 Comment 3