function getOwnerDocument(element) {
  return canUseDOM() ? element ? element.ownerDocument : document : null;
}
Get an element's owner document. Useful when components are used in iframes
or other environments like dev tools.

@param element