[−][src]Module sauron::dom
This module provides functionalities for manipulating the actual Document Object Model in the browser
Modules
apply_patches | provides functionalities related to patching the DOM in the browser. |
cmd | provides functionalities for commands to be executed by the system, such as when the application starts or after the application updates. |
events | https://developer.mozilla.org/en-US/docs/Web/Events |
Structs
AnimationEvent | The |
CreatedNode | 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. |
DomUpdater | 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. |
HashChangeEvent | The |
Http | Provides functions for doing http network request |
InputEvent | a custom InputEvent to contain the input string value |
KeyboardEvent | The |
MountEvent | 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 |
MouseEvent | The |
Program | 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. |
TransitionEvent | The |
Window | Provides access to the Browser window |
Enums
Event | Map the Event to DomEvent, which are browser events |
Constants
HTML_EVENTS | html events |
Traits
Component | The app should implement this trait for it to be handled by the Program |
Dispatch | This trait is used in the DomUpdater to call the dispatch method when an event occured |
Functions
body | provides access to the document body |
document | provides access to the document element |
execute_in_request_animation_frame | request animation frame and execute function |
history | utility function which returns the history api of the browser |
now | return the instantaneous time |
on | an event builder |
on_animationend | attach an on_animationend event to the html element |
on_auxclick | attach an on_auxclick event to the html element |
on_blur | attach an on_blur event to the html element |
on_broadcast | attach an on_broadcast event to the html element |
on_change | attach an on_change event to the html element |
on_checked | attach an on_checked event to the html element |
on_click | on click event |
on_contextmenu | attach an on_contextmenu event to the html element |
on_dblclick | attach an on_dblclick event to the html element |
on_doubleclick | attach an on_doubleclick event to the html element |
on_enter | custom on_enter event, which is triggered from key_press when the Enter key is pressed |
on_focus | attach an on_focus event to the html element |
on_hashchange | attach an on_hashchange event to the html element |
on_input | attach an on_input event to the html element |
on_keydown | attach an on_keydown event to the html element |
on_keypress | attach an on_keypress event to the html element |
on_keyup | attach an on_keyup event to the html element |
on_mount | custom mount event |
on_mousedown | attach an on_mousedown event to the html element |
on_mouseenter | attach an on_mouseenter event to the html element |
on_mouseleave | attach an on_mouseleave event to the html element |
on_mousemove | attach an on_mousemove event to the html element |
on_mouseout | attach an on_mouseout event to the html element |
on_mouseover | attach an on_mouseover event to the html element |
on_mouseup | attach an on_mouseup event to the html element |
on_pointerlockchange | attach an on_pointerlockchange event to the html element |
on_pointerlockerror | attach an on_pointerlockerror event to the html element |
on_readystatechange | attach an on_readystatechange event to the html element |
on_reset | attach an on_reset event to the html element |
on_scroll | attach callback to the scroll event |
on_select | attach an on_select event to the html element |
on_submit | attach an on_submit event to the html element |
on_transitionend | attach an on_transitionend event to the html element |
on_wheel | attach an on_wheel event to the html element |
performance | provides access to the window Performance api |
request_animation_frame | utility function which executes the agument closure in a request animation frame |
window | utility function which returns the Window element |
Type Definitions
Cmd | alias Cmd to use Program as the APP |