Download v1.2.0
New in v1.2.0
It's mid 2024 now, time for a new minor update!
Thanks to the #4 pull request by SpcFORK, a few things have been tweaked to make the library run better and build quicker. There is also a new method: getElement()
.
getElement()
acts similarly to qs()
but returns a HTMLElement instead of a Html instance. This could be easier in some instances such as this:
// Old method to retrieve sub-child HTML element (a bit more verbose)
const div = new Html('div').append(new Html('p').text("Hello!"));
const innerParagraph = div.qs("p").elm.textContent; // Hello!
// New method (simpler)
const div = new Html('div').append(new Html('p').text("Hello!"));
const innerParagraph = div.getElement("p").textContent; // Hello!
What's Changed
New Contributors
Full Changelog: v1.1.6...v1.2.0