ninegrid2 6.1348.0 → 6.1349.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.
- package/dist/bundle.cjs.js +12 -3
- package/dist/bundle.esm.js +12 -3
- package/dist/nx/_nxDiv.js +5 -0
- package/dist/nx/nxButtons.js +7 -3
- package/package.json +1 -1
- package/src/nx/_nxDiv.js +5 -0
- package/src/nx/nxButtons.js +7 -3
package/dist/bundle.cjs.js
CHANGED
|
@@ -28569,6 +28569,11 @@ class nxDiv extends HTMLElement {
|
|
|
28569
28569
|
|
|
28570
28570
|
this.originContents = this.innerHTML.trim();
|
|
28571
28571
|
//this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
28572
|
+
// 1. 문자열로 복사하는 대신, 자식 노드들을 안전하게 '대피'시킵니다.
|
|
28573
|
+
this.fragment = document.createDocumentFragment();
|
|
28574
|
+
while (this.firstChild) {
|
|
28575
|
+
this.fragment.appendChild(this.firstChild); // 원본 노드(이벤트 포함)를 이동
|
|
28576
|
+
}
|
|
28572
28577
|
|
|
28573
28578
|
// 만약 순수 nx-div로만 쓰일 경우(상속 x), 내용을 shadow에 채워줌
|
|
28574
28579
|
if (this.shadowRoot && this.tagName.toLowerCase() === 'nx-div') {
|
|
@@ -28898,12 +28903,16 @@ class nxButtons extends nxDiv {
|
|
|
28898
28903
|
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxButtons.css";
|
|
28899
28904
|
${ninegrid.getCustomPath(this,"nxButtons.css")}
|
|
28900
28905
|
</style>
|
|
28901
|
-
<
|
|
28906
|
+
<div id="container"></div>
|
|
28902
28907
|
`;
|
|
28903
28908
|
|
|
28904
|
-
|
|
28909
|
+
//target.appendChild(htmlTmpl.content.cloneNode(true));
|
|
28905
28910
|
|
|
28906
|
-
|
|
28911
|
+
// 2. 대피시켰던 원본 노드들을 다시 목적지에 집어넣습니다.
|
|
28912
|
+
const container = target.querySelector('#container');
|
|
28913
|
+
if (this.fragment) {
|
|
28914
|
+
container.appendChild(this.fragment); // 원본 그대로 복구!
|
|
28915
|
+
}
|
|
28907
28916
|
}
|
|
28908
28917
|
}
|
|
28909
28918
|
|
package/dist/bundle.esm.js
CHANGED
|
@@ -28565,6 +28565,11 @@ class nxDiv extends HTMLElement {
|
|
|
28565
28565
|
|
|
28566
28566
|
this.originContents = this.innerHTML.trim();
|
|
28567
28567
|
//this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
28568
|
+
// 1. 문자열로 복사하는 대신, 자식 노드들을 안전하게 '대피'시킵니다.
|
|
28569
|
+
this.fragment = document.createDocumentFragment();
|
|
28570
|
+
while (this.firstChild) {
|
|
28571
|
+
this.fragment.appendChild(this.firstChild); // 원본 노드(이벤트 포함)를 이동
|
|
28572
|
+
}
|
|
28568
28573
|
|
|
28569
28574
|
// 만약 순수 nx-div로만 쓰일 경우(상속 x), 내용을 shadow에 채워줌
|
|
28570
28575
|
if (this.shadowRoot && this.tagName.toLowerCase() === 'nx-div') {
|
|
@@ -28894,12 +28899,16 @@ class nxButtons extends nxDiv {
|
|
|
28894
28899
|
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxButtons.css";
|
|
28895
28900
|
${ninegrid.getCustomPath(this,"nxButtons.css")}
|
|
28896
28901
|
</style>
|
|
28897
|
-
<
|
|
28902
|
+
<div id="container"></div>
|
|
28898
28903
|
`;
|
|
28899
28904
|
|
|
28900
|
-
|
|
28905
|
+
//target.appendChild(htmlTmpl.content.cloneNode(true));
|
|
28901
28906
|
|
|
28902
|
-
|
|
28907
|
+
// 2. 대피시켰던 원본 노드들을 다시 목적지에 집어넣습니다.
|
|
28908
|
+
const container = target.querySelector('#container');
|
|
28909
|
+
if (this.fragment) {
|
|
28910
|
+
container.appendChild(this.fragment); // 원본 그대로 복구!
|
|
28911
|
+
}
|
|
28903
28912
|
}
|
|
28904
28913
|
}
|
|
28905
28914
|
|
package/dist/nx/_nxDiv.js
CHANGED
|
@@ -136,6 +136,11 @@ export class nxDiv extends HTMLElement {
|
|
|
136
136
|
|
|
137
137
|
this.originContents = this.innerHTML.trim();
|
|
138
138
|
//this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
139
|
+
// 1. 문자열로 복사하는 대신, 자식 노드들을 안전하게 '대피'시킵니다.
|
|
140
|
+
this.fragment = document.createDocumentFragment();
|
|
141
|
+
while (this.firstChild) {
|
|
142
|
+
this.fragment.appendChild(this.firstChild); // 원본 노드(이벤트 포함)를 이동
|
|
143
|
+
}
|
|
139
144
|
|
|
140
145
|
// 만약 순수 nx-div로만 쓰일 경우(상속 x), 내용을 shadow에 채워줌
|
|
141
146
|
if (this.shadowRoot && this.tagName.toLowerCase() === 'nx-div') {
|
package/dist/nx/nxButtons.js
CHANGED
|
@@ -21,12 +21,16 @@ class nxButtons extends nxDiv {
|
|
|
21
21
|
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxButtons.css";
|
|
22
22
|
${ninegrid.getCustomPath(this,"nxButtons.css")}
|
|
23
23
|
</style>
|
|
24
|
-
<
|
|
24
|
+
<div id="container"></div>
|
|
25
25
|
`;
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
//target.appendChild(htmlTmpl.content.cloneNode(true));
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
// 2. 대피시켰던 원본 노드들을 다시 목적지에 집어넣습니다.
|
|
30
|
+
const container = target.querySelector('#container');
|
|
31
|
+
if (this.fragment) {
|
|
32
|
+
container.appendChild(this.fragment); // 원본 그대로 복구!
|
|
33
|
+
}
|
|
30
34
|
}
|
|
31
35
|
}
|
|
32
36
|
|
package/package.json
CHANGED
package/src/nx/_nxDiv.js
CHANGED
|
@@ -136,6 +136,11 @@ export class nxDiv extends HTMLElement {
|
|
|
136
136
|
|
|
137
137
|
this.originContents = this.innerHTML.trim();
|
|
138
138
|
//this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
139
|
+
// 1. 문자열로 복사하는 대신, 자식 노드들을 안전하게 '대피'시킵니다.
|
|
140
|
+
this.fragment = document.createDocumentFragment();
|
|
141
|
+
while (this.firstChild) {
|
|
142
|
+
this.fragment.appendChild(this.firstChild); // 원본 노드(이벤트 포함)를 이동
|
|
143
|
+
}
|
|
139
144
|
|
|
140
145
|
// 만약 순수 nx-div로만 쓰일 경우(상속 x), 내용을 shadow에 채워줌
|
|
141
146
|
if (this.shadowRoot && this.tagName.toLowerCase() === 'nx-div') {
|
package/src/nx/nxButtons.js
CHANGED
|
@@ -21,12 +21,16 @@ class nxButtons extends nxDiv {
|
|
|
21
21
|
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxButtons.css";
|
|
22
22
|
${ninegrid.getCustomPath(this,"nxButtons.css")}
|
|
23
23
|
</style>
|
|
24
|
-
<
|
|
24
|
+
<div id="container"></div>
|
|
25
25
|
`;
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
//target.appendChild(htmlTmpl.content.cloneNode(true));
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
// 2. 대피시켰던 원본 노드들을 다시 목적지에 집어넣습니다.
|
|
30
|
+
const container = target.querySelector('#container');
|
|
31
|
+
if (this.fragment) {
|
|
32
|
+
container.appendChild(this.fragment); // 원본 그대로 복구!
|
|
33
|
+
}
|
|
30
34
|
}
|
|
31
35
|
}
|
|
32
36
|
|