first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import { canUseDOM } from './canUseDOM';
/**
* 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.
*
* @public
*/
export function getDocument(rootElement) {
// eslint-disable-next-line no-restricted-globals
if (!canUseDOM() || typeof document === 'undefined') {
return undefined;
}
else {
var el = rootElement;
// eslint-disable-next-line no-restricted-globals
return el && el.ownerDocument ? el.ownerDocument : document;
}
}
//# sourceMappingURL=getDocument.js.map