-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: maximum setting value length
- Loading branch information
Showing
15 changed files
with
310 additions
and
259 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
class PartialComponent extends HTMLElement { | ||
static observedAttributes = ["src", "uses"]; | ||
|
||
constructor() { | ||
const self = super(); | ||
self.style.display = "contents"; | ||
} | ||
|
||
attributeChangedCallback(name, _, value) { | ||
switch (name) { | ||
case "src": | ||
fetch(value) | ||
.then((res) => res.text()) | ||
.then((res) => { | ||
this.innerHTML = res; | ||
}) | ||
.catch((err) => { | ||
this.innerHTML = err; | ||
}); | ||
|
||
break; | ||
|
||
case "uses": | ||
setTimeout(() => { | ||
for (const hook of value.split(",")) { | ||
trigger(hook); | ||
} | ||
}, 500); | ||
|
||
break; | ||
|
||
default: | ||
return; | ||
} | ||
} | ||
} | ||
|
||
customElements.define("include-partial", PartialComponent); | ||
define("PartialComponent", PartialComponent); |
Oops, something went wrong.