You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
568 B
12 lines
568 B
import type { ClientToolHandler } from '../../core/tool-dispatcher.js';
|
|
|
|
/** Briefly flashes the page background — proves the client tool relay round-trip visibly. */
|
|
export const flashPage: ClientToolHandler = async () => {
|
|
const original = document.body.style.transition;
|
|
document.body.style.transition = 'background-color 150ms ease';
|
|
document.body.style.backgroundColor = '#fef08a';
|
|
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
document.body.style.backgroundColor = '';
|
|
document.body.style.transition = original;
|
|
return { flashed: true };
|
|
};
|
|
|