ninegrid2 6.185.0 → 6.186.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10737,18 +10737,14 @@ class ninegrid {
10737
10737
 
10738
10738
  while (currentElement) {
10739
10739
 
10740
- //console.log(currentElement);
10741
10740
  if (currentElement.matches(selector)) return currentElement;
10742
10741
 
10743
- // ✅ Shadow Root 가지고 있는 경우 내부에서 탐색
10744
- if (currentElement.shadowRoot) {
10745
- const found = currentElement.shadowRoot.querySelector(selector);
10746
- if (found) return found;
10747
- }
10742
+ // ✅ Shadow Root 내부에서 `selector`를 찾음
10743
+ if (currentElement.shadowRoot) ;
10748
10744
 
10749
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
10745
+ // ✅ Shadow Root를 넘어가 부모 요소 탐색
10746
+ currentElement = currentElement.getRootNode()?.host || currentElement.parentElement || null;
10750
10747
  }
10751
-
10752
10748
  return null;
10753
10749
  },
10754
10750
  querySelectorAll: (selector) => {
@@ -10735,18 +10735,14 @@ class ninegrid {
10735
10735
 
10736
10736
  while (currentElement) {
10737
10737
 
10738
- //console.log(currentElement);
10739
10738
  if (currentElement.matches(selector)) return currentElement;
10740
10739
 
10741
- // ✅ Shadow Root 가지고 있는 경우 내부에서 탐색
10742
- if (currentElement.shadowRoot) {
10743
- const found = currentElement.shadowRoot.querySelector(selector);
10744
- if (found) return found;
10745
- }
10740
+ // ✅ Shadow Root 내부에서 `selector`를 찾음
10741
+ if (currentElement.shadowRoot) ;
10746
10742
 
10747
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
10743
+ // ✅ Shadow Root를 넘어가 부모 요소 탐색
10744
+ currentElement = currentElement.getRootNode()?.host || currentElement.parentElement || null;
10748
10745
  }
10749
-
10750
10746
  return null;
10751
10747
  },
10752
10748
  querySelectorAll: (selector) => {
@@ -31,18 +31,17 @@ export class ninegrid {
31
31
 
32
32
  while (currentElement) {
33
33
 
34
- //console.log(currentElement);
35
34
  if (currentElement.matches(selector)) return currentElement;
36
35
 
37
- // ✅ Shadow Root 가지고 있는 경우 내부에서 탐색
36
+ // ✅ Shadow Root 내부에서 `selector`를 찾음
38
37
  if (currentElement.shadowRoot) {
39
- const found = currentElement.shadowRoot.querySelector(selector);
40
- if (found) return found;
38
+ //const found = currentElement.shadowRoot.querySelector(selector);
39
+ //if (found) return found;
41
40
  }
42
41
 
43
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
42
+ // ✅ Shadow Root를 넘어가 부모 요소 탐색
43
+ currentElement = currentElement.getRootNode()?.host || currentElement.parentElement || null;
44
44
  }
45
-
46
45
  return null;
47
46
  },
48
47
  querySelectorAll: (selector) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.185.0",
4
+ "version": "6.186.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -31,18 +31,17 @@ export class ninegrid {
31
31
 
32
32
  while (currentElement) {
33
33
 
34
- //console.log(currentElement);
35
34
  if (currentElement.matches(selector)) return currentElement;
36
35
 
37
- // ✅ Shadow Root 가지고 있는 경우 내부에서 탐색
36
+ // ✅ Shadow Root 내부에서 `selector`를 찾음
38
37
  if (currentElement.shadowRoot) {
39
- const found = currentElement.shadowRoot.querySelector(selector);
40
- if (found) return found;
38
+ //const found = currentElement.shadowRoot.querySelector(selector);
39
+ //if (found) return found;
41
40
  }
42
41
 
43
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
42
+ // ✅ Shadow Root를 넘어가 부모 요소 탐색
43
+ currentElement = currentElement.getRootNode()?.host || currentElement.parentElement || null;
44
44
  }
45
-
46
45
  return null;
47
46
  },
48
47
  querySelectorAll: (selector) => {