Program Type
Main entry points for a Sutil program
Example
For example, this will mount the SutilElement
returned from view()
onto the div
with id "sutil-app"
view () |> Program.mount
Constructors
Constructor | Description |
|
Static members
Static member | Description |
Full Usage:
Program.mount (doc, id, app)
Parameters:
Document
id : string
app : SutilElement
Returns: IDisposable
|
|
|
|
Full Usage:
Program.mount (host, app)
Parameters:
HTMLElement
app : SutilElement
Returns: IDisposable
|
|
|
|
Full Usage:
Program.mountAfter (prev, app)
Parameters:
HTMLElement
app : SutilElement
Returns: IDisposable
|
|
Full Usage:
Program.mountAppend (prev, app)
Parameters:
HTMLElement
app : SutilElement
Returns: IDisposable
|
|
|
Remove this node, cleaning up all related Sutil resources. By design, it should be rare that you need to use this, but it provides a Sutil-safe way to remove nodes from the DOM. One use case is a Modal component that could be appended to the body element, and then unmounted upon close. Even in that case, you might find it's neater to use a Bind.el() or Bind.visible() (or a combination) to control the content and visibility of the modal.
|