Hey,

Once I get bug 1470017 <https://bugzil.la/1470017> to stick, the
`EventTarget.ownerGlobal` property on nodes will change behavior slightly.

This will allow fixing long-standing web components issues (prototypes
getting lost on adopt) and some other subtler webcompat issues, like bug
2022763 <https://bugzil.la/2022763>.

In most cases it should be fine to keep using it in the front-end, but
there are two subtle behavior changes that might need code to be adjusted:

   - If you're dealing with nodes that might have been adopted,
   `ownerGlobal` might point to the original window of the node, not the one
   that's currently in.
   - .ownerGlobal might also now return non-null a bit more often (after
   the docshell is gone).

If you need the old behavior, you can use the new `Node.ownerDocGlobal`
property. I don't expect much fallout, and I want to proactively change
some more code to use `ownerDocGlobal` (e.g. child actors almost always
want to look at the window the node is in), but I thought it might be worth
a PSA, reach out if you see issues that might be caused by it on the chrome.

Let me know if there are any questions.

Thanks,
 -- Emilio

-- 
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAFhp-qcR_%3Dc-QMRqFPYVyK1v3p67ViNaeLRr1emN%3DaXJRs7jBg%40mail.gmail.com.

Reply via email to