Struct silkenweb::ElementBuilder [−][src]
pub struct ElementBuilder { /* fields omitted */ }
Build an HTML element.
Implementations
impl ElementBuilder
[src]
impl ElementBuilder
[src]pub fn new(tag: impl AsRef<str>) -> ElementBuilder
[src]
pub fn attribute<T>(
self,
name: impl AsRef<str>,
value: impl AttributeValue<T>
) -> ElementBuilder
[src]
self,
name: impl AsRef<str>,
value: impl AttributeValue<T>
) -> ElementBuilder
Set an attribute. Attribute values can be reactive.
pub fn child(self, child: impl Into<Element>) -> ElementBuilder
[src]
Add a child element after existing children. The child element can be reactive.
pub fn text(self, child: impl Text) -> ElementBuilder
[src]
Add a text node after existing children. The text node can be reactive.
pub fn effect<T>(self, child: impl Effect<T>) -> ElementBuilder
[src]
Apply an effect after the next render. For example, to set the focus of an element:
element.effect(|elem: &HtmlInputElement| elem.focus().unwrap());
Effects can be reactive. For example, to set the visibibilty of an item
based on a hidden
boolean signal:
let hidden = Signal::new(false); let is_hidden = hidden.read(); element.effect(is_hidden.map(|&hidden| move |elem: &HtmlInputElement| elem.set_hidden(hidden)));
pub fn on(
self,
name: &'static str,
f: impl FnMut(JsValue) + 'static
) -> ElementBuilder
[src]
self,
name: &'static str,
f: impl FnMut(JsValue) + 'static
) -> ElementBuilder
Register an event handler.
name
is the name of the event. See the MDN Events page for a list.
f
is the callback when the event fires and will be passed the
javascript Event
object.
Trait Implementations
impl Builder for ElementBuilder
[src]
impl Builder for ElementBuilder
[src]type Target = Element
pub fn build(self) -> <ElementBuilder as Builder>::Target
[src]
pub fn into_element(self) -> Element
[src]
impl DomElement for ElementBuilder
[src]
impl DomElement for ElementBuilder
[src]type Target = Element
pub fn dom_element(&self) -> <ElementBuilder as DomElement>::Target
[src]
impl From<ABuilder> for ElementBuilder
[src]
impl From<ABuilder> for ElementBuilder
[src]pub fn from(builder: ABuilder) -> ElementBuilder
[src]
impl From<AbbrBuilder> for ElementBuilder
[src]
impl From<AbbrBuilder> for ElementBuilder
[src]pub fn from(builder: AbbrBuilder) -> ElementBuilder
[src]
impl From<AddressBuilder> for ElementBuilder
[src]
impl From<AddressBuilder> for ElementBuilder
[src]pub fn from(builder: AddressBuilder) -> ElementBuilder
[src]
impl From<AreaBuilder> for ElementBuilder
[src]
impl From<AreaBuilder> for ElementBuilder
[src]pub fn from(builder: AreaBuilder) -> ElementBuilder
[src]
impl From<ArticleBuilder> for ElementBuilder
[src]
impl From<ArticleBuilder> for ElementBuilder
[src]pub fn from(builder: ArticleBuilder) -> ElementBuilder
[src]
impl From<AsideBuilder> for ElementBuilder
[src]
impl From<AsideBuilder> for ElementBuilder
[src]pub fn from(builder: AsideBuilder) -> ElementBuilder
[src]
impl From<AudioBuilder> for ElementBuilder
[src]
impl From<AudioBuilder> for ElementBuilder
[src]pub fn from(builder: AudioBuilder) -> ElementBuilder
[src]
impl From<BBuilder> for ElementBuilder
[src]
impl From<BBuilder> for ElementBuilder
[src]pub fn from(builder: BBuilder) -> ElementBuilder
[src]
impl From<BaseBuilder> for ElementBuilder
[src]
impl From<BaseBuilder> for ElementBuilder
[src]pub fn from(builder: BaseBuilder) -> ElementBuilder
[src]
impl From<BdiBuilder> for ElementBuilder
[src]
impl From<BdiBuilder> for ElementBuilder
[src]pub fn from(builder: BdiBuilder) -> ElementBuilder
[src]
impl From<BdoBuilder> for ElementBuilder
[src]
impl From<BdoBuilder> for ElementBuilder
[src]pub fn from(builder: BdoBuilder) -> ElementBuilder
[src]
impl From<BlockquoteBuilder> for ElementBuilder
[src]
impl From<BlockquoteBuilder> for ElementBuilder
[src]pub fn from(builder: BlockquoteBuilder) -> ElementBuilder
[src]
impl From<BrBuilder> for ElementBuilder
[src]
impl From<BrBuilder> for ElementBuilder
[src]pub fn from(builder: BrBuilder) -> ElementBuilder
[src]
impl From<ButtonBuilder> for ElementBuilder
[src]
impl From<ButtonBuilder> for ElementBuilder
[src]pub fn from(builder: ButtonBuilder) -> ElementBuilder
[src]
impl From<CanvasBuilder> for ElementBuilder
[src]
impl From<CanvasBuilder> for ElementBuilder
[src]pub fn from(builder: CanvasBuilder) -> ElementBuilder
[src]
impl From<CaptionBuilder> for ElementBuilder
[src]
impl From<CaptionBuilder> for ElementBuilder
[src]pub fn from(builder: CaptionBuilder) -> ElementBuilder
[src]
impl From<CiteBuilder> for ElementBuilder
[src]
impl From<CiteBuilder> for ElementBuilder
[src]pub fn from(builder: CiteBuilder) -> ElementBuilder
[src]
impl From<CodeBuilder> for ElementBuilder
[src]
impl From<CodeBuilder> for ElementBuilder
[src]pub fn from(builder: CodeBuilder) -> ElementBuilder
[src]
impl From<ColBuilder> for ElementBuilder
[src]
impl From<ColBuilder> for ElementBuilder
[src]pub fn from(builder: ColBuilder) -> ElementBuilder
[src]
impl From<ColgroupBuilder> for ElementBuilder
[src]
impl From<ColgroupBuilder> for ElementBuilder
[src]pub fn from(builder: ColgroupBuilder) -> ElementBuilder
[src]
impl From<DataBuilder> for ElementBuilder
[src]
impl From<DataBuilder> for ElementBuilder
[src]pub fn from(builder: DataBuilder) -> ElementBuilder
[src]
impl From<DatalistBuilder> for ElementBuilder
[src]
impl From<DatalistBuilder> for ElementBuilder
[src]pub fn from(builder: DatalistBuilder) -> ElementBuilder
[src]
impl From<DdBuilder> for ElementBuilder
[src]
impl From<DdBuilder> for ElementBuilder
[src]pub fn from(builder: DdBuilder) -> ElementBuilder
[src]
impl From<DelBuilder> for ElementBuilder
[src]
impl From<DelBuilder> for ElementBuilder
[src]pub fn from(builder: DelBuilder) -> ElementBuilder
[src]
impl From<DetailsBuilder> for ElementBuilder
[src]
impl From<DetailsBuilder> for ElementBuilder
[src]pub fn from(builder: DetailsBuilder) -> ElementBuilder
[src]
impl From<DfnBuilder> for ElementBuilder
[src]
impl From<DfnBuilder> for ElementBuilder
[src]pub fn from(builder: DfnBuilder) -> ElementBuilder
[src]
impl From<DialogBuilder> for ElementBuilder
[src]
impl From<DialogBuilder> for ElementBuilder
[src]pub fn from(builder: DialogBuilder) -> ElementBuilder
[src]
impl From<DivBuilder> for ElementBuilder
[src]
impl From<DivBuilder> for ElementBuilder
[src]pub fn from(builder: DivBuilder) -> ElementBuilder
[src]
impl From<DlBuilder> for ElementBuilder
[src]
impl From<DlBuilder> for ElementBuilder
[src]pub fn from(builder: DlBuilder) -> ElementBuilder
[src]
impl From<DtBuilder> for ElementBuilder
[src]
impl From<DtBuilder> for ElementBuilder
[src]pub fn from(builder: DtBuilder) -> ElementBuilder
[src]
impl From<ElementBuilder> for Element
[src]
impl From<ElementBuilder> for Element
[src]pub fn from(builder: ElementBuilder) -> Element
[src]
impl From<EmBuilder> for ElementBuilder
[src]
impl From<EmBuilder> for ElementBuilder
[src]pub fn from(builder: EmBuilder) -> ElementBuilder
[src]
impl From<EmbedBuilder> for ElementBuilder
[src]
impl From<EmbedBuilder> for ElementBuilder
[src]pub fn from(builder: EmbedBuilder) -> ElementBuilder
[src]
impl From<FieldsetBuilder> for ElementBuilder
[src]
impl From<FieldsetBuilder> for ElementBuilder
[src]pub fn from(builder: FieldsetBuilder) -> ElementBuilder
[src]
impl From<FigcaptionBuilder> for ElementBuilder
[src]
impl From<FigcaptionBuilder> for ElementBuilder
[src]pub fn from(builder: FigcaptionBuilder) -> ElementBuilder
[src]
impl From<FigureBuilder> for ElementBuilder
[src]
impl From<FigureBuilder> for ElementBuilder
[src]pub fn from(builder: FigureBuilder) -> ElementBuilder
[src]
impl From<FooterBuilder> for ElementBuilder
[src]
impl From<FooterBuilder> for ElementBuilder
[src]pub fn from(builder: FooterBuilder) -> ElementBuilder
[src]
impl From<FormBuilder> for ElementBuilder
[src]
impl From<FormBuilder> for ElementBuilder
[src]pub fn from(builder: FormBuilder) -> ElementBuilder
[src]
impl From<H1Builder> for ElementBuilder
[src]
impl From<H1Builder> for ElementBuilder
[src]pub fn from(builder: H1Builder) -> ElementBuilder
[src]
impl From<H2Builder> for ElementBuilder
[src]
impl From<H2Builder> for ElementBuilder
[src]pub fn from(builder: H2Builder) -> ElementBuilder
[src]
impl From<H3Builder> for ElementBuilder
[src]
impl From<H3Builder> for ElementBuilder
[src]pub fn from(builder: H3Builder) -> ElementBuilder
[src]
impl From<H4Builder> for ElementBuilder
[src]
impl From<H4Builder> for ElementBuilder
[src]pub fn from(builder: H4Builder) -> ElementBuilder
[src]
impl From<H5Builder> for ElementBuilder
[src]
impl From<H5Builder> for ElementBuilder
[src]pub fn from(builder: H5Builder) -> ElementBuilder
[src]
impl From<H6Builder> for ElementBuilder
[src]
impl From<H6Builder> for ElementBuilder
[src]pub fn from(builder: H6Builder) -> ElementBuilder
[src]
impl From<HeadBuilder> for ElementBuilder
[src]
impl From<HeadBuilder> for ElementBuilder
[src]pub fn from(builder: HeadBuilder) -> ElementBuilder
[src]
impl From<HeaderBuilder> for ElementBuilder
[src]
impl From<HeaderBuilder> for ElementBuilder
[src]pub fn from(builder: HeaderBuilder) -> ElementBuilder
[src]
impl From<HgroupBuilder> for ElementBuilder
[src]
impl From<HgroupBuilder> for ElementBuilder
[src]pub fn from(builder: HgroupBuilder) -> ElementBuilder
[src]
impl From<HrBuilder> for ElementBuilder
[src]
impl From<HrBuilder> for ElementBuilder
[src]pub fn from(builder: HrBuilder) -> ElementBuilder
[src]
impl From<IBuilder> for ElementBuilder
[src]
impl From<IBuilder> for ElementBuilder
[src]pub fn from(builder: IBuilder) -> ElementBuilder
[src]
impl From<IframeBuilder> for ElementBuilder
[src]
impl From<IframeBuilder> for ElementBuilder
[src]pub fn from(builder: IframeBuilder) -> ElementBuilder
[src]
impl From<ImgBuilder> for ElementBuilder
[src]
impl From<ImgBuilder> for ElementBuilder
[src]pub fn from(builder: ImgBuilder) -> ElementBuilder
[src]
impl From<InputBuilder> for ElementBuilder
[src]
impl From<InputBuilder> for ElementBuilder
[src]pub fn from(builder: InputBuilder) -> ElementBuilder
[src]
impl From<InsBuilder> for ElementBuilder
[src]
impl From<InsBuilder> for ElementBuilder
[src]pub fn from(builder: InsBuilder) -> ElementBuilder
[src]
impl From<KbdBuilder> for ElementBuilder
[src]
impl From<KbdBuilder> for ElementBuilder
[src]pub fn from(builder: KbdBuilder) -> ElementBuilder
[src]
impl From<LabelBuilder> for ElementBuilder
[src]
impl From<LabelBuilder> for ElementBuilder
[src]pub fn from(builder: LabelBuilder) -> ElementBuilder
[src]
impl From<LegendBuilder> for ElementBuilder
[src]
impl From<LegendBuilder> for ElementBuilder
[src]pub fn from(builder: LegendBuilder) -> ElementBuilder
[src]
impl From<LiBuilder> for ElementBuilder
[src]
impl From<LiBuilder> for ElementBuilder
[src]pub fn from(builder: LiBuilder) -> ElementBuilder
[src]
impl From<LinkBuilder> for ElementBuilder
[src]
impl From<LinkBuilder> for ElementBuilder
[src]pub fn from(builder: LinkBuilder) -> ElementBuilder
[src]
impl From<MainBuilder> for ElementBuilder
[src]
impl From<MainBuilder> for ElementBuilder
[src]pub fn from(builder: MainBuilder) -> ElementBuilder
[src]
impl From<MapBuilder> for ElementBuilder
[src]
impl From<MapBuilder> for ElementBuilder
[src]pub fn from(builder: MapBuilder) -> ElementBuilder
[src]
impl From<MarkBuilder> for ElementBuilder
[src]
impl From<MarkBuilder> for ElementBuilder
[src]pub fn from(builder: MarkBuilder) -> ElementBuilder
[src]
impl From<MenuBuilder> for ElementBuilder
[src]
impl From<MenuBuilder> for ElementBuilder
[src]pub fn from(builder: MenuBuilder) -> ElementBuilder
[src]
impl From<MetaBuilder> for ElementBuilder
[src]
impl From<MetaBuilder> for ElementBuilder
[src]pub fn from(builder: MetaBuilder) -> ElementBuilder
[src]
impl From<MeterBuilder> for ElementBuilder
[src]
impl From<MeterBuilder> for ElementBuilder
[src]pub fn from(builder: MeterBuilder) -> ElementBuilder
[src]
impl From<NavBuilder> for ElementBuilder
[src]
impl From<NavBuilder> for ElementBuilder
[src]pub fn from(builder: NavBuilder) -> ElementBuilder
[src]
impl From<NoscriptBuilder> for ElementBuilder
[src]
impl From<NoscriptBuilder> for ElementBuilder
[src]pub fn from(builder: NoscriptBuilder) -> ElementBuilder
[src]
impl From<ObjectBuilder> for ElementBuilder
[src]
impl From<ObjectBuilder> for ElementBuilder
[src]pub fn from(builder: ObjectBuilder) -> ElementBuilder
[src]
impl From<OlBuilder> for ElementBuilder
[src]
impl From<OlBuilder> for ElementBuilder
[src]pub fn from(builder: OlBuilder) -> ElementBuilder
[src]
impl From<OptgroupBuilder> for ElementBuilder
[src]
impl From<OptgroupBuilder> for ElementBuilder
[src]pub fn from(builder: OptgroupBuilder) -> ElementBuilder
[src]
impl From<OptionBuilder> for ElementBuilder
[src]
impl From<OptionBuilder> for ElementBuilder
[src]pub fn from(builder: OptionBuilder) -> ElementBuilder
[src]
impl From<OutputBuilder> for ElementBuilder
[src]
impl From<OutputBuilder> for ElementBuilder
[src]pub fn from(builder: OutputBuilder) -> ElementBuilder
[src]
impl From<PBuilder> for ElementBuilder
[src]
impl From<PBuilder> for ElementBuilder
[src]pub fn from(builder: PBuilder) -> ElementBuilder
[src]
impl From<ParamBuilder> for ElementBuilder
[src]
impl From<ParamBuilder> for ElementBuilder
[src]pub fn from(builder: ParamBuilder) -> ElementBuilder
[src]
impl From<PictureBuilder> for ElementBuilder
[src]
impl From<PictureBuilder> for ElementBuilder
[src]pub fn from(builder: PictureBuilder) -> ElementBuilder
[src]
impl From<PreBuilder> for ElementBuilder
[src]
impl From<PreBuilder> for ElementBuilder
[src]pub fn from(builder: PreBuilder) -> ElementBuilder
[src]
impl From<ProgressBuilder> for ElementBuilder
[src]
impl From<ProgressBuilder> for ElementBuilder
[src]pub fn from(builder: ProgressBuilder) -> ElementBuilder
[src]
impl From<QBuilder> for ElementBuilder
[src]
impl From<QBuilder> for ElementBuilder
[src]pub fn from(builder: QBuilder) -> ElementBuilder
[src]
impl From<RbBuilder> for ElementBuilder
[src]
impl From<RbBuilder> for ElementBuilder
[src]pub fn from(builder: RbBuilder) -> ElementBuilder
[src]
impl From<RpBuilder> for ElementBuilder
[src]
impl From<RpBuilder> for ElementBuilder
[src]pub fn from(builder: RpBuilder) -> ElementBuilder
[src]
impl From<RtBuilder> for ElementBuilder
[src]
impl From<RtBuilder> for ElementBuilder
[src]pub fn from(builder: RtBuilder) -> ElementBuilder
[src]
impl From<RtcBuilder> for ElementBuilder
[src]
impl From<RtcBuilder> for ElementBuilder
[src]pub fn from(builder: RtcBuilder) -> ElementBuilder
[src]
impl From<RubyBuilder> for ElementBuilder
[src]
impl From<RubyBuilder> for ElementBuilder
[src]pub fn from(builder: RubyBuilder) -> ElementBuilder
[src]
impl From<SBuilder> for ElementBuilder
[src]
impl From<SBuilder> for ElementBuilder
[src]pub fn from(builder: SBuilder) -> ElementBuilder
[src]
impl From<SampBuilder> for ElementBuilder
[src]
impl From<SampBuilder> for ElementBuilder
[src]pub fn from(builder: SampBuilder) -> ElementBuilder
[src]
impl From<ScriptBuilder> for ElementBuilder
[src]
impl From<ScriptBuilder> for ElementBuilder
[src]pub fn from(builder: ScriptBuilder) -> ElementBuilder
[src]
impl From<SectionBuilder> for ElementBuilder
[src]
impl From<SectionBuilder> for ElementBuilder
[src]pub fn from(builder: SectionBuilder) -> ElementBuilder
[src]
impl From<SelectBuilder> for ElementBuilder
[src]
impl From<SelectBuilder> for ElementBuilder
[src]pub fn from(builder: SelectBuilder) -> ElementBuilder
[src]
impl From<SmallBuilder> for ElementBuilder
[src]
impl From<SmallBuilder> for ElementBuilder
[src]pub fn from(builder: SmallBuilder) -> ElementBuilder
[src]
impl From<SourceBuilder> for ElementBuilder
[src]
impl From<SourceBuilder> for ElementBuilder
[src]pub fn from(builder: SourceBuilder) -> ElementBuilder
[src]
impl From<SpanBuilder> for ElementBuilder
[src]
impl From<SpanBuilder> for ElementBuilder
[src]pub fn from(builder: SpanBuilder) -> ElementBuilder
[src]
impl From<StrongBuilder> for ElementBuilder
[src]
impl From<StrongBuilder> for ElementBuilder
[src]pub fn from(builder: StrongBuilder) -> ElementBuilder
[src]
impl From<StyleBuilder> for ElementBuilder
[src]
impl From<StyleBuilder> for ElementBuilder
[src]pub fn from(builder: StyleBuilder) -> ElementBuilder
[src]
impl From<SubBuilder> for ElementBuilder
[src]
impl From<SubBuilder> for ElementBuilder
[src]pub fn from(builder: SubBuilder) -> ElementBuilder
[src]
impl From<SummaryBuilder> for ElementBuilder
[src]
impl From<SummaryBuilder> for ElementBuilder
[src]pub fn from(builder: SummaryBuilder) -> ElementBuilder
[src]
impl From<SupBuilder> for ElementBuilder
[src]
impl From<SupBuilder> for ElementBuilder
[src]pub fn from(builder: SupBuilder) -> ElementBuilder
[src]
impl From<TableBuilder> for ElementBuilder
[src]
impl From<TableBuilder> for ElementBuilder
[src]pub fn from(builder: TableBuilder) -> ElementBuilder
[src]
impl From<TbodyBuilder> for ElementBuilder
[src]
impl From<TbodyBuilder> for ElementBuilder
[src]pub fn from(builder: TbodyBuilder) -> ElementBuilder
[src]
impl From<TdBuilder> for ElementBuilder
[src]
impl From<TdBuilder> for ElementBuilder
[src]pub fn from(builder: TdBuilder) -> ElementBuilder
[src]
impl From<TextareaBuilder> for ElementBuilder
[src]
impl From<TextareaBuilder> for ElementBuilder
[src]pub fn from(builder: TextareaBuilder) -> ElementBuilder
[src]
impl From<TfootBuilder> for ElementBuilder
[src]
impl From<TfootBuilder> for ElementBuilder
[src]pub fn from(builder: TfootBuilder) -> ElementBuilder
[src]
impl From<ThBuilder> for ElementBuilder
[src]
impl From<ThBuilder> for ElementBuilder
[src]pub fn from(builder: ThBuilder) -> ElementBuilder
[src]
impl From<TheadBuilder> for ElementBuilder
[src]
impl From<TheadBuilder> for ElementBuilder
[src]pub fn from(builder: TheadBuilder) -> ElementBuilder
[src]
impl From<TimeBuilder> for ElementBuilder
[src]
impl From<TimeBuilder> for ElementBuilder
[src]pub fn from(builder: TimeBuilder) -> ElementBuilder
[src]
impl From<TitleBuilder> for ElementBuilder
[src]
impl From<TitleBuilder> for ElementBuilder
[src]pub fn from(builder: TitleBuilder) -> ElementBuilder
[src]
impl From<TrBuilder> for ElementBuilder
[src]
impl From<TrBuilder> for ElementBuilder
[src]pub fn from(builder: TrBuilder) -> ElementBuilder
[src]
impl From<TrackBuilder> for ElementBuilder
[src]
impl From<TrackBuilder> for ElementBuilder
[src]pub fn from(builder: TrackBuilder) -> ElementBuilder
[src]
impl From<UBuilder> for ElementBuilder
[src]
impl From<UBuilder> for ElementBuilder
[src]pub fn from(builder: UBuilder) -> ElementBuilder
[src]
impl From<UlBuilder> for ElementBuilder
[src]
impl From<UlBuilder> for ElementBuilder
[src]pub fn from(builder: UlBuilder) -> ElementBuilder
[src]
impl From<VarBuilder> for ElementBuilder
[src]
impl From<VarBuilder> for ElementBuilder
[src]pub fn from(builder: VarBuilder) -> ElementBuilder
[src]
impl From<VideoBuilder> for ElementBuilder
[src]
impl From<VideoBuilder> for ElementBuilder
[src]pub fn from(builder: VideoBuilder) -> ElementBuilder
[src]
impl From<WbrBuilder> for ElementBuilder
[src]
impl From<WbrBuilder> for ElementBuilder
[src]pub fn from(builder: WbrBuilder) -> ElementBuilder
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ElementBuilder
impl !RefUnwindSafe for ElementBuilder
impl !Send for ElementBuilder
impl !Send for ElementBuilder
impl !Sync for ElementBuilder
impl !Sync for ElementBuilder
impl Unpin for ElementBuilder
impl Unpin for ElementBuilder
impl !UnwindSafe for ElementBuilder
impl !UnwindSafe for ElementBuilder