UseGetBody
katanakit-js / useGetBody
Function: useGetBody()
Section titled “Function: useGetBody()”function useGetBody(): HTMLBodyElement | null;Defined in: infrastructure/dom/dom.service.ts:57
Returns the <body> element, or null outside a browser.
Returns
Section titled “Returns”HTMLBodyElement | null
The document.body element cast as HTMLBodyElement.
Example
Section titled “Example”const body = useGetBody();body?.classList.add("loaded");