ninegrid2 6.163.0 → 6.166.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.
@@ -10729,26 +10729,27 @@ class ninegrid {
10729
10729
 
10730
10730
  if (!("shadow" in Element.prototype)) {
10731
10731
  Object.defineProperty(Element.prototype, "shadow", {
10732
- closest: function (selector) {
10733
- console.log(selector);
10734
- return "xx";
10735
- /**
10736
- let currentElement = this;
10737
-
10738
- while (currentElement) {
10739
- if (currentElement.matches(selector)) return currentElement;
10740
-
10741
- // Shadow Root를 가지고 있는 경우 내부에서 탐색
10742
- if (currentElement.shadowRoot) {
10743
- const found = currentElement.shadowRoot.querySelector(selector);
10744
- if (found) return found;
10745
- }
10732
+ get: function () {
10733
+ return {
10734
+ closest: function (selector) {
10735
+ let currentElement = this;
10736
+
10737
+ while (currentElement) {
10738
+ if (currentElement.matches(selector)) return currentElement;
10739
+
10740
+ // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
10741
+ if (currentElement.shadowRoot) {
10742
+ const found = currentElement.shadowRoot.querySelector(selector);
10743
+ if (found) return found;
10744
+ }
10746
10745
 
10747
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
10748
- }
10746
+ currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
10747
+ }
10749
10748
 
10750
- return null; */
10751
- },
10749
+ return null;
10750
+ },
10751
+ };
10752
+ }
10752
10753
  });
10753
10754
  }
10754
10755
  }
@@ -10727,26 +10727,27 @@ class ninegrid {
10727
10727
 
10728
10728
  if (!("shadow" in Element.prototype)) {
10729
10729
  Object.defineProperty(Element.prototype, "shadow", {
10730
- closest: function (selector) {
10731
- console.log(selector);
10732
- return "xx";
10733
- /**
10734
- let currentElement = this;
10735
-
10736
- while (currentElement) {
10737
- if (currentElement.matches(selector)) return currentElement;
10738
-
10739
- // Shadow Root를 가지고 있는 경우 내부에서 탐색
10740
- if (currentElement.shadowRoot) {
10741
- const found = currentElement.shadowRoot.querySelector(selector);
10742
- if (found) return found;
10743
- }
10730
+ get: function () {
10731
+ return {
10732
+ closest: function (selector) {
10733
+ let currentElement = this;
10734
+
10735
+ while (currentElement) {
10736
+ if (currentElement.matches(selector)) return currentElement;
10737
+
10738
+ // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
10739
+ if (currentElement.shadowRoot) {
10740
+ const found = currentElement.shadowRoot.querySelector(selector);
10741
+ if (found) return found;
10742
+ }
10744
10743
 
10745
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
10746
- }
10744
+ currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
10745
+ }
10747
10746
 
10748
- return null; */
10749
- },
10747
+ return null;
10748
+ },
10749
+ };
10750
+ }
10750
10751
  });
10751
10752
  }
10752
10753
  }
@@ -23,26 +23,27 @@ export class ninegrid {
23
23
 
24
24
  if (!("shadow" in Element.prototype)) {
25
25
  Object.defineProperty(Element.prototype, "shadow", {
26
- closest: function (selector) {
27
- console.log(selector);
28
- return "xx";
29
- /**
30
- let currentElement = this;
31
-
32
- while (currentElement) {
33
- if (currentElement.matches(selector)) return currentElement;
34
-
35
- // Shadow Root를 가지고 있는 경우 내부에서 탐색
36
- if (currentElement.shadowRoot) {
37
- const found = currentElement.shadowRoot.querySelector(selector);
38
- if (found) return found;
39
- }
26
+ get: function () {
27
+ return {
28
+ closest: function (selector) {
29
+ let currentElement = this;
30
+
31
+ while (currentElement) {
32
+ if (currentElement.matches(selector)) return currentElement;
33
+
34
+ // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
35
+ if (currentElement.shadowRoot) {
36
+ const found = currentElement.shadowRoot.querySelector(selector);
37
+ if (found) return found;
38
+ }
40
39
 
41
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
42
- }
40
+ currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
41
+ }
43
42
 
44
- return null; */
45
- },
43
+ return null;
44
+ },
45
+ };
46
+ }
46
47
  });
47
48
  }
48
49
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.163.0",
4
+ "version": "6.166.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -23,26 +23,27 @@ export class ninegrid {
23
23
 
24
24
  if (!("shadow" in Element.prototype)) {
25
25
  Object.defineProperty(Element.prototype, "shadow", {
26
- closest: function (selector) {
27
- console.log(selector);
28
- return "xx";
29
- /**
30
- let currentElement = this;
31
-
32
- while (currentElement) {
33
- if (currentElement.matches(selector)) return currentElement;
34
-
35
- // Shadow Root를 가지고 있는 경우 내부에서 탐색
36
- if (currentElement.shadowRoot) {
37
- const found = currentElement.shadowRoot.querySelector(selector);
38
- if (found) return found;
39
- }
26
+ get: function () {
27
+ return {
28
+ closest: function (selector) {
29
+ let currentElement = this;
30
+
31
+ while (currentElement) {
32
+ if (currentElement.matches(selector)) return currentElement;
33
+
34
+ // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
35
+ if (currentElement.shadowRoot) {
36
+ const found = currentElement.shadowRoot.querySelector(selector);
37
+ if (found) return found;
38
+ }
40
39
 
41
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
42
- }
40
+ currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
41
+ }
43
42
 
44
- return null; */
45
- },
43
+ return null;
44
+ },
45
+ };
46
+ }
46
47
  });
47
48
  }
48
49
  }