[Solved] TypeError: Cannot read property 'contains' of null

It looks like it’s using el.ownerDocument.documentElement.contains(el). Any idea why documentElement would be null @matthewp ?