improving styling, fixing bugs with profile, login error handling
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Sam Russell
|
||||
Captured Sun
|
||||
2.19.26 - Adding dynamicText()
|
||||
2.16.26 - Adding event objects to the onTouch callbacks
|
||||
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
|
||||
@@ -691,6 +692,24 @@ HTMLElement.prototype.horizontalAlign = function (value) {
|
||||
|
||||
/* Elements */
|
||||
|
||||
HTMLElement.prototype.dynamicText = function(attr, template) {
|
||||
// Set initial text if attr already has a value
|
||||
if (attr !== attr.toLowerCase()) {
|
||||
throw new Error(`quill: dynamicText() attr "${attr}" must be lowercase`);
|
||||
}
|
||||
if (this.getAttribute(attr)) {
|
||||
this.innerText = template.replace('{{}}', this.getAttribute(attr));
|
||||
}
|
||||
|
||||
new MutationObserver(() => {
|
||||
console.log("mutateing")
|
||||
const value = this.getAttribute(attr);
|
||||
this.innerText = template.replace('{{}}', value ?? '');
|
||||
}).observe(this, { attributes: true, attributeFilter: [attr] });
|
||||
|
||||
return this
|
||||
};
|
||||
|
||||
quill.setChildren = function(el, innerContent) {
|
||||
if(typeof innerContent === "string") {
|
||||
el.innerText = innerContent
|
||||
@@ -1204,5 +1223,6 @@ HTMLElement.prototype.attr = function(attributes) {
|
||||
this.setAttribute(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user