requireElement
FitFileViewer - API Documentation v30.0.1
FitFileViewer - API Documentation / utils/dom/domHelpers / requireElement
Function: requireElement()
requireElement(
selector:string,root?:ParentNode,runtime?:DomHelpersRuntime):HTMLElement
Defined in: utils/dom/domHelpers.ts:184
Assert a required element exists and return it as HTMLElement.
Parametersβ
selectorβ
string
root?β
ParentNode
runtime?β
DomHelpersRuntime = ...
Returnsβ
HTMLElement
Throwsβ
Error if selector is empty or no element matches.