Crate sauron[][src]

Expand description

Sauron is an web framework for creating fast and interactive client side web application, as well as server-side rendering for back-end web applications.

Re-exports

pub use sauron_core::web_sys;
pub use sauron_core::wasm_bindgen;
pub use sauron_core::js_sys;
pub use sauron_core::jss;
pub use sauron_core::mt_dom;

Modules

provides functionalities related to patching the DOM in the browser.

provides functionalities for commands to be executed by the system, such as when the application starts or after the application updates.

This module provides functionalities for manipulating the actual Document Object Model in the browser

Create events Object

Provides functions and macros to build html elements

reexport prelude from sauron core

Provides functions and macros to build svg elements

Macros

Quasi-quoting macro for building sauron Nodes.

Structs

The AnimationEvent class.

A node along with all of the closures that were created for that node’s events and all of it’s child node’s events.

Used for keeping a real DOM node up to date based on the current Node and a new incoming Node that represents our latest DOM state.

The HashChangeEvent class.

Provides functions for doing http network request

a custom InputEvent to contain the input string value

The KeyboardEvent class.

Contains the time it took for the last app update call for the component

an event when a virtual Node is mounted the field node is the actual dom node where the virtual Node is created in the actual dom

The MouseEvent class.

Holds the user App and the dom updater This is passed into the event listener and the dispatch program will be called after the event is triggered.

Text node

The TransitionEvent class.

Provides access to the Browser window

Enums

Map the Event to DomEvent, which are browser events

Constants

html events

Traits

The app should implement this trait for it to be handled by the Program

A component has a view and can update itself. Optionally a component can return a succeeding Msg to be done on the next update iteration.

This trait is used in the DomUpdater to call the dispatch method when an event occured

render node, elements to a writable buffer

A widget has the same capability to a Component. Paren component of a widget can listen to widget events.

Functions

provides access to the document body

This is a sauron html specific functionality diff 2 nodes with attribute using &'static str instead of generic ATT

provides access to the document element

request animation frame and execute function

utility function which returns the history api of the browser

return the instantaneous time

an event builder

attach an on_animationend event to the html element

attach an on_auxclick event to the html element

attach an on_blur event to the html element

attach an on_broadcast event to the html element

attach an on_change event to the html element

attach an on_checked event to the html element

on click event

attach an on_contextmenu event to the html element

attach an on_dblclick event to the html element

attach an on_doubleclick event to the html element

custom on_enter event, which is triggered from key_press when the Enter key is pressed

attach an on_focus event to the html element

attach an on_hashchange event to the html element

attach an on_input event to the html element

attach an on_keydown event to the html element

attach an on_keypress event to the html element

attach an on_keyup event to the html element

custom mount event

attach an on_mousedown event to the html element

attach an on_mouseenter event to the html element

attach an on_mouseleave event to the html element

attach an on_mousemove event to the html element

attach an on_mouseout event to the html element

attach an on_mouseover event to the html element

attach an on_mouseup event to the html element

attach an on_pointerlockchange event to the html element

attach an on_pointerlockerror event to the html element

attach an on_popstate event to the html element

attach an on_readystatechange event to the html element

attach an on_reset event to the html element

attach callback to the scroll event

attach an on_select event to the html element

attach an on_submit event to the html element

attach an on_transitionend event to the html element

attach an on_wheel event to the html element

provides access to the window Performance api

utility function which executes the agument closure in a request animation frame

utility function which returns the Window element

Type Definitions

Attribute type used in sauron where the type of the Attribute name is &’static str

Callback where Event type is supplied

alias Cmd to use Program as the APP

Element type with tag and attribute name type set to &’static str

A simplified version of saurdon_vdom node, where we supplied the type for the tag which is a &’static str. The missing type is now only MSG which will be supplied by the users App code.

Patch as result of diffing the current_vdom and the new vdom. The tag and attribute name types is set to &’static str