UNPKG

@uifabric/utilities

Version:

Fluent UI React utilities for building components.

19 lines 625 B
import { _isSSR } from './setSSR'; /** * Helper to get the document object. Note that in popup window cases, document * might be the wrong document, which is why we look at ownerDocument for the * truth. Also note that the SSR flag is used to test ssr scenarios even if * document is defined (from JSDOM for example.) * * @public */ export function getDocument(rootElement) { if (_isSSR || typeof document === 'undefined') { return undefined; } else { var el = rootElement; return el && el.ownerDocument ? el.ownerDocument : document; } } //# sourceMappingURL=getDocument.js.map