WCF_PATH: string;
WSC_API_URL: string;
- getFontAwesome6Styles: (name: string) => IconMetadata | undefined;
+ getFontAwesome6IconMetadata: (name: string) => IconMetadata | undefined;
jQuery: JQueryStatic;
WCF: any;
slot.name = "svg";
root.append(slot);
} else {
- const [codepoint] = window.getFontAwesome6Styles(this.name)!;
+ const [codepoint] = window.getFontAwesome6IconMetadata(this.name)!;
root.append(codepoint);
-
- // TODO: Add style
}
}
throw new TypeError("Must provide the name of the icon.");
}
- const styles = window.getFontAwesome6Styles(this.name);
+ const styles = window.getFontAwesome6IconMetadata(this.name);
if (styles === undefined) {
throw new TypeError(`The icon '${this.name}' is unknown or unsupported.`);
}
throw new Error("Cannot change the icon of a brand icon.");
}
- const metadata = window.getFontAwesome6Styles(name);
+ const metadata = window.getFontAwesome6IconMetadata(name);
if (metadata === undefined) {
throw new TypeError(`The icon '${name}' is unknown or unsupported.`);
}
declare global {
interface Window {
- getFontAwesome6Styles: (name: string) => IconMetadata | undefined;
+ getFontAwesome6IconMetadata: (name: string) => IconMetadata | undefined;
}
}
root.append(slot);
}
else {
- const [codepoint] = window.getFontAwesome6Styles(this.name);
+ const [codepoint] = window.getFontAwesome6IconMetadata(this.name);
root.append(codepoint);
- // TODO: Add style
}
}
validate() {
if (this.name === "") {
throw new TypeError("Must provide the name of the icon.");
}
- const styles = window.getFontAwesome6Styles(this.name);
+ const styles = window.getFontAwesome6IconMetadata(this.name);
if (styles === undefined) {
throw new TypeError(`The icon '${this.name}' is unknown or unsupported.`);
}
if (this.brand) {
throw new Error("Cannot change the icon of a brand icon.");
}
- const metadata = window.getFontAwesome6Styles(name);
+ const metadata = window.getFontAwesome6IconMetadata(name);
if (metadata === undefined) {
throw new TypeError(`The icon '${name}' is unknown or unsupported.`);
}