Files
platform/src/workspaces/injector/remove-outline.ts
T
2026-02-16 19:34:35 +00:00

10 lines
378 B
TypeScript

export const removeOutline = (elements: HTMLElement | HTMLElement[] | null) => {
if (!elements) return;
const elemArray = Array.isArray(elements) ? elements : [elements];
for (const element of elemArray) {
element.style.outline = '';
if (!element.style[0]) element.removeAttribute('style');
removeOutline(Array.from(element.children) as HTMLElement[]);
}
};