Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/Umbraco.Web.UI.Client/src/external/uui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,28 @@ declare global {
disabled?: boolean;
}
}

Comment thread
nielslyngsoe marked this conversation as resolved.
/**
* @deprecated
* For v.17 we need to keep this function around for backwards compatibility with the legacy UUI 1.x custom elements.
* TODO: To be removed in v.18.
* Fire a warning if the custom element with the provided name isn't available.
* @func demandCustomElement
* @param {HTMLElement} requester - Reference to the element requiring this custom element..
Comment thread
nielslyngsoe marked this conversation as resolved.
* @param {string} elementName - Tag name of the required custom element.
* @param {string} message - Optional message describing the consequences of it not begin available.
*/
export const demandCustomElement = (
requester: HTMLElement,
elementName: string,
message: string = `This element has to be present for ${requester.nodeName} to work appropriate.`,
Comment thread
nielslyngsoe marked this conversation as resolved.
) => {
if (!customElements.get(elementName)) {
console.warn(
`%c ${requester.nodeName} requires ${elementName} element to be registered!`,
'font-weight: bold;',
message,
requester,
);
}
};
Loading