fixing buggy shadowRoot code

this code raises an Uncaught TypeError: Cannot read property 'call' of undefined in current versions of Chrome. 

Fixing so the logic makes more sense (and doesn't cause errors).
Merge pull request #3 from abritinthebay/patch-1

fixing bug in shadowDOM code for current versions of Chrome