I couldn\'t find much from Googling, but I\'m probably Googling the wrong terms.
I\'m trying to understand what the \"el\" in \"$.el\" is from here: http://joestelmach.g
It creates a tree of elements and appends them to body
el
is just an identifier and it refers to an element, a DOM element, which is a convention in that library.
el
is a function that's been placed on the $
object, and can be invoked to generate DOM elements:
$.el('table')
el
also acts as a placeholder for other objects, like the table
function:
$.el.table()
You can obtain the explanation seeing the source of the project in the github:
// If we're in a CommonJS environment, we export our laconic methods
if(typeof module !== 'undefined' && module.exports) {
module.exports = laconic;
}
// otherwise, we attach them to the top level $.el namespace
else {
var dollar = context.$ || {};
dollar.el = laconic;
context.$ = dollar;
}
The code means that $.el namespace will have the function laconic()
and this function create elements using document.createElement
and append to the body.