switching networks works, established server functions

This commit is contained in:
metacryst
2026-01-16 05:22:52 -06:00
parent d2982543d0
commit d3df5bb6cb
31 changed files with 410 additions and 310 deletions

View File

@@ -1,6 +1,7 @@
/*
Sam Russell
Captured Sun
1.16.26 - Moving nav event dispatch out of pushState, adding null feature to attr()
1.5.26 - Switching verticalAlign and horizontalAlign names, adding borderVertical and Horizontal
12.26.25 - State for arrays, nested objects. State for stacks (Shadow-only)
12.17.25 - [Hyperia] - adding width, height functions. adding "e" to onClick. adding the non-window $$ funcs.
@@ -27,7 +28,6 @@ let oldPushState = history.pushState;
history.pushState = function pushState() {
let ret = oldPushState.apply(this, arguments);
window.dispatchEvent(new Event('pushstate'));
window.dispatchEvent(new Event('navigate'));
return ret;
};
@@ -53,8 +53,8 @@ window.setQuery = function(key, value) {
};
window.navigateTo = function(url) {
window.dispatchEvent(new Event('navigate'));
window.history.pushState({}, '', url);
window.dispatchEvent(new Event('navigate'));
}
window.setLocation = function(url) {
@@ -1197,7 +1197,11 @@ HTMLElement.prototype.attr = function(attributes) {
}
for (const [key, value] of Object.entries(attributes)) {
this.setAttribute(key, value);
if(value === null) {
this.removeAttribute(key)
} else {
this.setAttribute(key, value);
}
}
return this;
};