Remove cached references to Node
constructor
#2472
Labels
Synthetic Shadow
Synthetic shadow DOM polyfill
Node
constructor
#2472
This issue provides context for why we cache
Node
references along with guidance on when we can remove the related code.There is legacy code in the platform, for which the owning team is unknown, that sets
window.Node
tonull
during theunload
event, presumably to deal with IE memory leaks. When LWC component authors subsequently invoked certain polyfilled DOM APIs (e.g.,composedPath()
,event.target
, etc) during theunload
event, it causedinstanceof Node
checks to throw exceptions. Rather than taking on the deceptively monumental task of removing that line of code, we decided to simply cache theNode
reference internally.These changes can be safely removed when
SfdcInitialize.js
is updated to remove thewindow.Node = null
.The text was updated successfully, but these errors were encountered: