JSFiddle - React, Tailwind, and code Playground

HTML

<pre id=log>
Should all be true:
</pre>

JavaScript

var host = document.createElement("div");
var child = document.createElement("span");
host.appendChild(child);

var shadow = new WebKitShadowRoot(host);
var shadowChild = document.createElement("span");
shadow.appendChild(shadowChild);

log.innerHTML += host.contains(child) + "\n";
log.innerHTML += host.contains(shadow) + "\n";
log.innerHTML += host.contains(shadowChild) + "\n";