UNPKG

accelerator-core

Version:

[![Build Status](https://travis-ci.org/furkleindustries/accelerator-core.svg?branch=master)](https://travis-ci.org/furkleindustries/accelerator-core)

14 lines (10 loc) 409 B
import { unmountComponentAtNode, } from 'react-dom'; import { assertValid } from 'ts-assertions'; export function clearLoadingScreen(appSelector: string, loadSelector: string) { const root = assertValid<Element>(document.querySelector(appSelector)); root.setAttribute('aria-busy', 'false'); const load = assertValid<Element>(document.querySelector(loadSelector)); unmountComponentAtNode(load); }