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.
21 lines
423 B
21 lines
423 B
import '../types.mjs';
|
|
import '../browser.mjs';
|
|
import { isClient } from '@vueuse/core';
|
|
import { isString } from '@vue/shared';
|
|
|
|
const getElement = (target) => {
|
|
if (!isClient || target === "")
|
|
return null;
|
|
if (isString(target)) {
|
|
try {
|
|
return document.querySelector(target);
|
|
} catch (e) {
|
|
return null;
|
|
}
|
|
}
|
|
return target;
|
|
};
|
|
|
|
export { getElement };
|
|
//# sourceMappingURL=element.mjs.map
|