Trait InnerHtmlAttribute

pub trait InnerHtmlAttribute<T>: Sized + AddAnyAttr
where T: InnerHtmlValue,
{ // Provided method fn inner_html(self, value: T) -> Self::Output<InnerHtml<T>> { ... } }
Expand description

Sets the inner HTML of an element.

Provided Methods§

fn inner_html(self, value: T) -> Self::Output<InnerHtml<T>>

Sets the inner HTML of this element.

No children should be given to this element, as this HTML will be used instead.

§Security

Be very careful when using this method. Always remember to sanitize the input to avoid a cross-site scripting (XSS) vulnerability.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<T, E, At> InnerHtmlAttribute<T> for HtmlElement<E, At, ()>
where HtmlElement<E, At, ()>: AddAnyAttr, E: ElementWithChildren, At: Attribute, T: InnerHtmlValue,