mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 03:05:38 -05:00
Deprecate py-button, py-inputbox, py-box and py-title (#931)
This commit is contained in:
@@ -111,3 +111,16 @@ export function joinPaths(parts: string[], separator = '/') {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
export function createDeprecationWarning(msg: string, elementName: string): void {
|
||||
const banners = document.getElementsByClassName('alert-banner py-warning');
|
||||
let bannerCount = 0;
|
||||
for (const banner of banners) {
|
||||
if (banner.innerHTML.includes(elementName)) {
|
||||
bannerCount++;
|
||||
}
|
||||
}
|
||||
if (bannerCount == 0) {
|
||||
_createAlertBanner(msg, "warning");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user