add moveBefore support warning

This commit is contained in:
Orion Reed 2024-12-11 01:47:38 -05:00
parent bb280ca086
commit da7e5ca8ba
1 changed files with 19 additions and 0 deletions

View File

@ -33,6 +33,20 @@
folk-shape {
background: rgb(187, 178, 178);
}
.warning-banner {
position: fixed;
top: 0;
left: 0;
right: 0;
background-color: #fff3cd;
color: #856404;
border: 1px solid #ffeeba;
padding: 12px;
text-align: center;
z-index: 1000;
font-family: system-ui, -apple-system, sans-serif;
}
</style>
</head>
<body>
@ -48,6 +62,11 @@
// Check for moveBefore support
if (!Element.prototype.moveBefore) {
const warning = document.createElement('div');
warning.className = 'warning-banner';
warning.innerHTML =
'⚠️ Note: moveBefore() API requires Chrome Canary with <code>chrome://flags/#atomic-move</code> enabled';
document.body.insertAdjacentElement('afterbegin', warning);
console.warn('Note: moveBefore() API requires Chrome Canary with chrome://flags/#atomic-move enabled');
}