release/0.1.0 #1

Merged
Ray merged 7 commits from release/0.1.0 into master 2025-04-07 20:29:29 +00:00
2 changed files with 49 additions and 2 deletions
Showing only changes of commit c4434e1b2b - Show all commits

View File

@ -1,6 +1,6 @@
{
"name": "LiteRyzJS",
"version": "0.1.0.357",
"version": "0.1.0.397",
"devDependencies": {
"css-loader": "^7.1.2",
"sass": "^1.77.8",

View File

@ -6,4 +6,51 @@ Document.ready = async function(fn) {
fn();
});
})();
}
}
Document.getWidth = function(el) {
if (el == null) {
return 0;
}
if (typeof(el) == "undefined") {
return 0;
}
return (el.offsetWidth || el.innerWidth || el.clientWidth);
}
Document.getHeight = function(el) {
if (el == null) {
return 0;
}
if (typeof(el) == "undefined") {
return 0;
}
return (el.offsetHeight || el.innerHeight || el.clientHeight);
}
Document.appendHtml = function(el, html) {
const newEl = document.createElement(html);
el.appendChild(newEl);
}
Document.addClass = function(el, className) {
if (el.classList.contains(className)) {
return;
}
el.classList.add(className);
}
Document.removeClass = function(el, className) {
if (!el.classList.contains(className)) {
return;
}
el.classList.remove(className);
}