[][src]Trait mogwai::view::interface::PostBuildView

pub trait PostBuildView {
    type DomNode;
    pub fn post_build(&mut self, tx: Transmitter<Self::DomNode>);
}

PostBuildViews can send their underlying browser DOM node as a message on a Transmitter once they've been built.

PostBuildView allows you to construct component behaviors that operate on the constructed node directly, while still keeping the definition in its place within your view builder function. For example, you may want to use input.focus() within the update function of your component. This method allows you to store the input HtmlInputElement once it is built, allowing you to use it as you see fit within your Component::update function.

Associated Types

type DomNode[src]

The type of the inner DOM node.

Loading content...

Required methods

pub fn post_build(&mut self, tx: Transmitter<Self::DomNode>)[src]

After the view is built, transmit its underlying DomNode on the given transmitter.

Loading content...

Implementors

impl<T: IsDomNode + Clone> PostBuildView for ViewBuilder<T>[src]

type DomNode = T

impl<T: IsDomNode> PostBuildView for View<T>[src]

type DomNode = T

Loading content...