Update Sigpro
This commit is contained in:
@@ -313,7 +313,7 @@
|
||||
return outlet;
|
||||
};
|
||||
|
||||
$.go = (p) => (window.location.hash = p.replace(/^#?\/?/, "#/"));
|
||||
$.go = (path) => (window.location.hash = path.replace(/^#?\/?/, "#/"));
|
||||
|
||||
$.mount = (component, target) => {
|
||||
const el = typeof target === "string" ? document.querySelector(target) : target;
|
||||
@@ -326,8 +326,15 @@
|
||||
};
|
||||
|
||||
const tags = `div span p h1 h2 h3 h4 h5 h6 br hr section article aside nav main header footer address ul ol li dl dt dd a em strong small i b u mark time sub sup pre code blockquote details summary dialog form label input textarea select button option fieldset legend table thead tbody tfoot tr th td caption img video audio canvas svg iframe picture source progress meter`.split(/\s+/);
|
||||
tags.forEach((t) => {
|
||||
window[t.charAt(0).toUpperCase() + t.slice(1)] = (p, c) => $.html(t, p, c);
|
||||
tags.forEach((tagName) => {
|
||||
const helperName = tagName.charAt(0).toUpperCase() + tagName.slice(1);
|
||||
|
||||
Object.defineProperty(window, helperName, {
|
||||
value: (props, content) => $.html(tagName, props, content),
|
||||
writable: false,
|
||||
configurable: true,
|
||||
enumerable: true
|
||||
});
|
||||
});
|
||||
|
||||
window.$ = $;
|
||||
|
||||
Reference in New Issue
Block a user