aboutsummaryrefslogtreecommitdiffstats
path: root/src/css/var/isHiddenWithinTree.js
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-09-12 02:27:19 +0200
committerGitHub <noreply@github.com>2023-09-12 02:27:19 +0200
commitf75daab09102a4dd5107deadb55d4a169f86254a (patch)
tree71e7b9076d61d7aed7569f51c57b8651e9c16bfc /src/css/var/isHiddenWithinTree.js
parent42e50f8c21fbfd08092ad81add4ac38982ef0841 (diff)
downloadjquery-f75daab09102a4dd5107deadb55d4a169f86254a.tar.gz
jquery-f75daab09102a4dd5107deadb55d4a169f86254a.zip
Core: Use named exports in `src/`
The `default` export is treated differently across tooling when transpiled to CommonJS - tools differ on whether `module.exports` represents the full module object or just its default export. Switch `src/` modules to named exports for tooling consistency. Fixes gh-5262 Closes gh-5292
Diffstat (limited to 'src/css/var/isHiddenWithinTree.js')
-rw-r--r--src/css/var/isHiddenWithinTree.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/css/var/isHiddenWithinTree.js b/src/css/var/isHiddenWithinTree.js
index c88747827..22b8221f9 100644
--- a/src/css/var/isHiddenWithinTree.js
+++ b/src/css/var/isHiddenWithinTree.js
@@ -1,4 +1,4 @@
-import jQuery from "../../core.js";
+import { jQuery } from "../../core.js";
// isHiddenWithinTree reports if an element has a non-"none" display style (inline and/or
// through the CSS cascade), which is useful in deciding whether or not to make it visible.
@@ -7,7 +7,7 @@ import jQuery from "../../core.js";
// * Being disconnected from the document does not force an element to be classified as hidden.
// These differences improve the behavior of .toggle() et al. when applied to elements that are
// detached or contained within hidden ancestors (gh-2404, gh-2863).
-export default function( elem, el ) {
+export function isHiddenWithinTree( elem, el ) {
// isHiddenWithinTree might be called from jQuery#filter function;
// in that case, element will be second argument