Make ShadowDOM visualizer work better with non WebKit implementations

This work is to allow the polyfill to work in Firefox.