chore: cleanup

pull/18058/head
paoloricciuti 5 months ago
parent a0b60cb137
commit 61ea8e9f19

@ -1,5 +1,5 @@
import { hydrating } from '../hydration.js';
import { clear_text_content, get_first_child, focus, add_event_listener } from '../operations.js';
import { clear_text_content, get_first_child, add_event_listener } from '../operations.js';
import { queue_micro_task } from '../task.js';
/**
@ -14,7 +14,7 @@ export function autofocus(dom, value) {
queue_micro_task(() => {
if (document.activeElement === body) {
focus(dom);
dom.focus();
}
});
}

@ -788,14 +788,3 @@ export function class_list_toggle(element, name, force) {
}
element.classList.toggle(name, force);
}
/**
* @param {HTMLElement} element
*/
export function focus(element) {
if (renderer) {
// doesn't make sense with custom renderers
throw new Error('focus is not supported with custom renderers');
}
element.focus();
}

Loading…
Cancel
Save