JSFiddle - React, Tailwind, and code Playground

by tdecs

JavaScript

var Utils = {
  contains: function (el1, el2) {
    return (el1.contains ? el1.contains(el2) : true);
  }
};

alert(Utils.contains(window, document)); // true