12 lines
264 B
TypeScript
12 lines
264 B
TypeScript
|
import {
|
||
|
Ref,
|
||
|
ref,
|
||
|
inject,
|
||
|
} from 'vue';
|
||
|
|
||
|
export const SymRootElement = Symbol('Schlechtenburg root element');
|
||
|
export const useRootElement = () => {
|
||
|
const rootElement: Ref<HTMLElement|null> = inject(SymRootElement, ref(null));
|
||
|
return { rootElement };
|
||
|
};
|