Add $a as alias for querySelectorAll
This commit is contained in:
parent
7e289927de
commit
05177b4e39
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@fwdekker/template",
|
||||
"version": "2.5.4",
|
||||
"version": "2.5.5",
|
||||
"description": "The base template for pages on fwdekker.com.",
|
||||
"author": "F.W. Dekker",
|
||||
"license": "MIT",
|
||||
|
@ -34,8 +34,8 @@
|
|||
"grunt-contrib-cssmin": "^4.0.0",
|
||||
"grunt-contrib-watch": "^1.1.0",
|
||||
"grunt-focus": "^1.0.0",
|
||||
"grunt-webpack": "^4.0.3",
|
||||
"webpack": "^5.52.1",
|
||||
"webpack-cli": "^4.8.0"
|
||||
"grunt-webpack": "^5.0.0",
|
||||
"webpack": "^5.64.0",
|
||||
"webpack-cli": "^4.9.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,14 @@ const stringToHtml = function(string, query) {
|
|||
*/
|
||||
const $ = q => document.querySelector(q);
|
||||
|
||||
/**
|
||||
* Alias for `document.querySelectorAll`.
|
||||
*
|
||||
* @param q {string} the query string
|
||||
* @returns {NodeListOf<HTMLElement>} the elements identified by the query string
|
||||
*/
|
||||
const $a = q => document.querySelectorAll(q);
|
||||
|
||||
/**
|
||||
* Runs the given function once the page is loaded.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue