jsquery_node 1.0.5 → 1.0.7
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/jsquery.d.ts +6611 -2398
- package/jsquery.js +2 -2
- package/jsquery.ts +4 -2
- package/package.json +1 -1
package/jsquery.js
CHANGED
|
@@ -264,9 +264,9 @@ export const { $, JSQuery } = (() => {
|
|
|
264
264
|
function J(q) {
|
|
265
265
|
return Element.from(document.querySelector(q));
|
|
266
266
|
}
|
|
267
|
-
J.from = (elt) => {
|
|
267
|
+
J.from = ((elt) => {
|
|
268
268
|
return Element.from(elt);
|
|
269
|
-
};
|
|
269
|
+
});
|
|
270
270
|
J.all = (q) => {
|
|
271
271
|
return Element.from(document.querySelectorAll(q));
|
|
272
272
|
};
|
package/jsquery.ts
CHANGED
|
@@ -160,7 +160,7 @@ export const { $, JSQuery } = (() => {
|
|
|
160
160
|
hasClass(name: string) {
|
|
161
161
|
return this.elt.classList.contains(name);
|
|
162
162
|
}
|
|
163
|
-
$(q: any): Element {
|
|
163
|
+
$(q: any): Element|null {
|
|
164
164
|
return J.from(this.elt.querySelector(q)) as any;
|
|
165
165
|
}
|
|
166
166
|
all(q: any): ElementArray {
|
|
@@ -271,7 +271,9 @@ export const { $, JSQuery } = (() => {
|
|
|
271
271
|
return Element.from(document.querySelector(q)) as any;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
J.from =
|
|
274
|
+
J.from = ((elt:any) => {
|
|
275
|
+
return Element.from(elt);
|
|
276
|
+
}) as typeof Element.from;
|
|
275
277
|
|
|
276
278
|
J.all = (q: any): ElementArray => {
|
|
277
279
|
return Element.from(document.querySelectorAll(q)) as any;
|