UseGetRoot
katanakit-js / useGetRoot
Function: useGetRoot()
Section titled “Function: useGetRoot()”function useGetRoot(): HTMLElement | null;Defined in: infrastructure/dom/dom.service.ts:41
Returns the root <html> element, or null outside a browser.
Returns
Section titled “Returns”HTMLElement | null
The document.documentElement element.
Example
Section titled “Example”const root = useGetRoot();root?.setAttribute("lang", "en");