Idris2Doc : Web.Async.Util

Web.Async.Util

(source)

Reexports

importpublic FS
importpublic FS.Concurrent.Signal
importpublic IO.Async.JS
importpublic JS
importpublic Text.HTML

Definitions

prim__append : ParentNode->Node->PrimIO ()
prim__appendTxt : ParentNode->String->PrimIO ()
prim__remove : ChildNode->PrimIO ()
prim__createElement : String->PrimIOElement
prim__setAttribute : Element->String->String->PrimIO ()
prim__removeAttribute : Element->String->PrimIO ()
prim__innerHTML : InnerHTML->PrimIOString
prim__setInnerHTML : InnerHTML->String->PrimIO ()
prim__content : HTMLTemplateElement->PrimIODocumentFragment
prim__createDocumentFragment : PrimIODocumentFragment
prim__setChecked : HTMLInputElement->Boolean->PrimIO ()
prim__checked : HTMLInputElement->PrimIOBool
window : HasIOio=>ioWindow
  Return the current window.

Totality: total
Visibility: export
document : HasIOio=>ioDocument
  Return the current document.

Totality: total
Visibility: export
getBody : HasIOio=>io (MaybeHTMLElement)
  Return the body element of the current document.

Return `Nothing` in case the current document has no body defined.

Totality: total
Visibility: export
click : HasIOio=>HTMLElement->io ()
  Simulates a mouse click on an element.

Totality: total
Visibility: export
replaceChildren : HasIOio=>ParentNode->Node->io ()
  Replace all children of the given node with a new node.

Totality: total
Visibility: export
append : HasIOio=>ParentNode->Node->io ()
  Append the given node to a DOM element's children

Totality: total
Visibility: export
prepend : HasIOio=>ParentNode->Node->io ()
  Prepend the given node to a DOM element's children

Totality: total
Visibility: export
after : HasIOio=>ChildNode->Node->io ()
  Insert the given node after a DOM element

Totality: total
Visibility: export
before : HasIOio=>ChildNode->Node->io ()
  Insert the given node before a DOM element

Totality: total
Visibility: export
replace : HasIOio=>ChildNode->Node->io ()
  Replace a DOM element with the given node.

Totality: total
Visibility: export
remove : HasIOio=>ChildNode->io ()
  Replace a DOM element with the given document fragment.

Totality: total
Visibility: export
createElement : HasIOio=>String->ioElement
  Creates a DOM element of the given type.

Totality: total
Visibility: export
setAttribute : HasIOio=>Element->String->String->io ()
  Sets an attribute of a DOM element.

Totality: total
Visibility: export
removeAttribute : HasIOio=>Element->String->io ()
  Unsets an attribute of a DOM element.

Totality: total
Visibility: export
innerHTML : HasIOio=>InnerHTML->ioString
  Returns the inner HTML structure of a node as a String

Totality: total
Visibility: export
setInnerHTML : HasIOio=>InnerHTML->String->io ()
  Sets the inner HTML structure of a node.

Totality: total
Visibility: export
focus : HasIOio=>HTMLElement->io ()
  Focus the given HTML element

Totality: total
Visibility: export
blur : HasIOio=>HTMLElement->io ()
  Blur (lose focus of) the given HTML element

Totality: total
Visibility: export
currentTime : HasIOio=>ioInteger
  Get the current time in milliseconds since 1970/01/01.

Totality: total
Visibility: export
timed : HasIOio=>iot->io (t, Integer)
  Determine the time taken to run an `IO` action.

Totality: total
Visibility: export
timed' : HasIOio=>io () ->ioInteger
Totality: total
Visibility: export
toClipboard : HasIOio=>String->io ()
  Writes as string to the clipboard.

Totality: total
Visibility: export
itemToClipboard : ElemJSErres=>ClipboardItem->AsyncJSes ()
  Writes a `ClipboardItem` to the clipboard.

Totality: total
Visibility: export
clipboardItem : HasIOio=>String->String->ioClipboardItem
  Wraps some text data plus its mimetype in a `ClipboardItem`

Totality: total
Visibility: export
dataToClipboard : ElemJSErres=>String->String->AsyncJSes ()
  Writes some text data plus its mimetype to the clipboard.

Totality: total
Visibility: export
readFromClipboard1 : HasIOio=> (String->IO1 ()) ->io ()
Totality: total
Visibility: export
readFromClipboard : AsynceesString
Totality: total
Visibility: export
dialogShow : HasIOio=>HTMLDialogElement->io ()
  Show the given dialog element

Totality: total
Visibility: export
dialogClose : HasIOio=>HTMLDialogElement->io ()
  Close the given dialog element

Totality: total
Visibility: export
showModal : HasIOio=>HTMLDialogElement->io ()
  Show the given dialog element in "modal" mode

Totality: total
Visibility: export
interfaceToBlob : Type->Type
Parameters: a
Methods:
toBlob : a->AnyPtr

Implementations:
ToBlob (IArraykString)
ToBlob (ArrayString)
ToBlob (ListString)
ToBlobString
toBlob : ToBloba=>a->AnyPtr
Totality: total
Visibility: public export
blob : HasIOio=>ToBloba=>a->String->ioBlob
Totality: total
Visibility: export
recordObjectURL : Type
  A URL (as a wrapped string) pointing to an object in memory.

This should be treated as a resource and properly released via `cleanup`.

Totality: total
Visibility: export
Constructor: 
OU : String->ObjectURL

Projection: 
.url : ObjectURL->String

Hints:
CastObjectURLString
Resource (AsyncJS) ObjectURL
blobURL : HasIOio=>Blob->ioObjectURL
  Provides a URL pointing to the given `Blob` object.

Use `cast` to convert the `ObjectURL` to a `String` and make sure to
release it

Totality: total
Visibility: export
blobBytes : HasJSErres=>Blob->AsyncJSesAnyBuffer
  Extracts the bytes from a `Blob`.

Totality: total
Visibility: export
0ElemType : Reft->Type
  DOM type associacte with an ElemRef

Totality: total
Visibility: public export
0JS : ListType->Type->Type
Totality: total
Visibility: public export
js : HasJSErres=>JSIOt->JSest
Totality: total
Visibility: export
jsCast : HasJSErres=>SafeCastt=>String->s->JSest
Totality: total
Visibility: export
unmaybe : HasJSErres=> Lazy String->Maybet->JSest
Totality: total
Visibility: export
body : HasJSErres=>JSesHTMLElement
Totality: total
Visibility: export
getElementById : HasJSErres=>SafeCastt=>MaybeString->String->JSest
  Tries to retrieve an element of the given type by looking
up its ID in the DOM.

This will throw a `JSErr` in case the element cannot be found
or cast to the desired result type.

Totality: total
Visibility: export
getHTMLElementById : HasJSErres=>String->String->JSesHTMLElement
  Tries to retrieve a HTMLElement by looking

This will throw a `JSErr` in case the element cannot be found
or cast to the desired result type.

Totality: total
Visibility: export
getElementByRef : HasJSErres=> (r : Reft) ->JSes (ElemTyper)
  Tries to retrieve an element of the given type by looking
up its ID in the DOM.

This will throw a `JSErr` in case the element cannot be found
or cast to the desired result type.

Totality: total
Visibility: export
castElementByRef : HasJSErres=>SafeCastt=>Refx->JSest
  Tries to retrieve an element of the given type by looking
up its ID in the DOM.

This will throw a `JSErr` in case the element cannot be found
or cast to the desired result type.

Totality: total
Visibility: export
validityMessage : HasJSErres=>Reft-> {auto0_ : ValidityTagt} ->String->JSes ()
  Sets a custom validity message at the given reference.

Pass the empty string to mark the element as valid.

This will throw a `JSErr` in case the element cannot be found
or cast to the desired result type.

Totality: total
Visibility: export
validate : HasJSErres=>Reft-> {auto0_ : ValidityTagt} ->EitherStringb->JSes ()
  Sets or unsets a custom validity message at the given node.

Totality: total
Visibility: export
setValue : HasJSErres=>Reft-> {auto0_ : ValueTagt} ->String->JSes ()
  Sets the value of the element identified by the given ID.

This will throw a `JSErr` in case the element cannot be found
or cast to the desired result type.

Totality: total
Visibility: export
0Act : Type->Type
Totality: total
Visibility: public export
0JSPull : Type->Type->Type
Totality: total
Visibility: public export
0JSStream : Type->Type
Totality: total
Visibility: public export
pullErr : AsyncStreamfesVoid->Asyncfes ()
Visibility: export
runJS : JS [JSErr] () ->IO ()
Visibility: export
runProg : JSStreamVoid->IO ()
Visibility: export
mvcActEvs : JSStreame->s-> (e->s->Acts) ->JSStreamVoid
Totality: total
Visibility: export
mvcAct : e->s-> (Sinke=>e->s->Acts) ->JSStreamVoid
Totality: total
Visibility: export
mvc : e->s-> (e->s->s) -> (Sinke=>e->s->Act ()) ->JSStreamVoid
Totality: total
Visibility: export
getClientRect : LIOf=>Element->fRect
Totality: total
Visibility: export