assets/js/modules/query.js in fenton-jekyll-boilerplate-0.0.11 vs assets/js/modules/query.js in fenton-jekyll-boilerplate-0.0.12
- old
+ new
@@ -6,16 +6,16 @@
* @param {string} query
* @param {HTMLElement | null} [container]
* @returns {HTMLElement}
*/
function qs(query, container) {
- var target = (container)
+ const target = (container)
? container
: document;
/** @type {HTMLElement | null} */
- var result = target.querySelector(query);
+ const result = target.querySelector(query);
if (result) {
return result;
}
@@ -28,15 +28,15 @@
* @param {string} query
* @param {HTMLElement | null} [container]
* @returns {NodeListOf<any>}
*/
function qsa(query, container) {
- var target = (container)
+ const target = (container)
? container
: document;
/** @type {NodeListOf<HTMLElement>} */
- var result = target.querySelectorAll(query);
+ const result = target.querySelectorAll(query);
return result;
}
export { qs, qsa };
\ No newline at end of file