ui5-smart-access
Version:
A custom accessibility popover for SAP UI5 applications.
22 lines (18 loc) • 565 B
JavaScript
let isCustomStyleLoaded = false;
export function loadCustomStyleOnce() {
if (isCustomStyleLoaded) {
return;
}
try {
const sCorrectPath = sap.ui.require.toUrl("ui5-smart-access/css/style.css");
const link = document.createElement("link");
link.id = "ui5-smart-access-styles";
link.rel = "stylesheet";
link.type = "text/css";
link.href = sCorrectPath;
document.head.appendChild(link);
isCustomStyleLoaded = true;
} catch (error) {
console.error("Failed to load custom CSS:", error);
}
}