Idris2Doc : Rhone.JS.ElemRef

Rhone.JS.ElemRef

(source)

Definitions

dataElemRef : Type->Type
  A typed reference to an element or container in the DOM. Elements can
either be referenced by their ID string or their CSS class
(both of which must be unique), or by holding a value directly.
This can be used to access the element in question,
for instance by invoking `getElementByRef`.

In addition, we provide (pseudo-)element references for
`body`, `document`, and `window`.

Totality: total
Visibility: public export
Constructors:
Id : (0_ : ElementTypetagt) ->String->ElemReft
Class : (0_ : ElementTypetagt) ->String->ElemReft
Body : ElemRefHTMLElement
Document : ElemRefDocument
Window : ElemRefWindow
dataById : ElemReft->Type
  Predicate witnessing that a given `ElemRef` is a reference
by ID.

Totality: total
Visibility: public export
Constructor: 
IsById : ById (Idtpeid)
dataByClass : ElemReft->Type
  Predicate witnessing that a given `ElemRef` is a reference
by Class.

Totality: total
Visibility: public export
Constructor: 
IsByClass : ByClass (Classtpeid)
ref : (r : ElemReft) -> {auto0_ : ByIdr} ->Attributeev
  Uses an element ref as an ID attribute

Totality: total
Visibility: export
idRef : (r : ElemReft) -> {auto0_ : ByIdr} ->ListDeclaration->Rulen
  Uses an element ref as an ID selector

Totality: total
Visibility: export
classRef : (r : ElemReft) -> {auto0_ : ByClassr} ->ListDeclaration->Rulen
  Uses an element ref as a class selector

Totality: total
Visibility: export
strictGetElementById : SafeCastt=>String->String->JSIOt
  Tries to retrieve an element of the given type by looking
up its ID in the DOM. Unlike `getElementById`, this will throw
an exception in the `JSIO` monad if the element is not found
or can't be safely cast to the desired type.

Totality: total
Visibility: export
strictGetHTMLElementById : String->String->JSIOHTMLElement
  Tries to retrieve a HTMLElement by looking
up its ID in the DOM. Unlike `getElementById`, this will throw
an exception in the `JSIO` monad if the element is not found
or can't be safely cast to the desired type.

Totality: total
Visibility: export
getElementByRef : SafeCastt=>ElemReft->JSIOt
  Tries to retrieve an element of the given type by looking
up its ID in the DOM. Unlike `getElementById`, this will throw
an exception in the `JSIO` monad if the element is not found
or can't be safely cast to the desired type.

Totality: total
Visibility: export
castElementByRef : SafeCastt2=>ElemReft->JSIOt2
  Tries to retrieve an element of the given type by looking
up its ID in the DOM. Unlike `getElementById`, this will throw
an exception in the `JSIO` monad if the element is not found
or can't be safely cast to the desired type.

Totality: total
Visibility: export