toolkitchen/PointerEvents — pull request #56 by azakus (2013-04-23 17:58:09+00:00)
Title: Only watch document and real shadow roots

ShadowDOMPolyfill is super verbose watching fake shadow roots (to emulate redistribution), and this causes duplicate add/removeElementListener calls as things flow into and out of the document.

As the document is the "one source of truth" in the ShadowDOMPolyfill, it is the only thing that we need to watch in that instance.

Real ShadowDOM is watched correctly, because it can contain nodes the document would never see otherwise.