7 lines
158 B
JavaScript
7 lines
158 B
JavaScript
export function resolveTo(selector) {
|
|
if (typeof selector === 'string') {
|
|
return document.querySelector(selector);
|
|
}
|
|
return selector();
|
|
}
|