Consider migrating from node.ownerGlobal to node.ownerDocGlobal
Categories
(Remote Protocol :: Agent, task, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned, Mentored)
References
Details
(Whiteboard: [webdriver:backlog][lang=js])
After Bug 1470017 lands, the ownerGlobal property will no longer have the same value when a node is reparented to another document.
Before bug 1470017, node.ownerGlobal always points to the "live" global where the node lives, which means we always have node.ownerDocument.defaultView === node.ownerGlobal. But after this bug, if a node is moved from one document to another, the ownerGlobal property will still point to the original global.
In most cases we probably want the live "global", I don't think we have cases in remote where we need the original global. A new property was introduced: node.ownerDocGlobal, which is equal to (node.ownerDocument || node).ownerGlobal. The node.ownerDocument || node bit is here in order to handle document which doesn't have an ownerDocument.
We should probably replace all call sites for node.ownerGlobal with node.ownerDocGlobal
| Reporter | ||
Updated•5 months ago
|
| Reporter | ||
Comment 1•5 months ago
|
||
Note: we should wait until Bug 1470017 is resolved before taking this one
| Reporter | ||
Comment 2•5 months ago
|
||
Bug 1470017 will address this directly.
Description
•