add moveBefore support warning
This commit is contained in:
parent
bb280ca086
commit
da7e5ca8ba
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue