switching networks works, established server functions
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user