Skip to main content

SanitizerMethods

pub trait SanitizerMethods<D: DomTypes> {
    // Required methods
    fn Get(&self) -> SanitizerConfig;
    fn AllowElement(
        &self,
        element: StringOrSanitizerElementNamespaceWithAttributes,
    ) -> bool;
    fn RemoveElement(&self, element: StringOrSanitizerElementNamespace) -> bool;
    fn ReplaceElementWithChildren(
        &self,
        element: StringOrSanitizerElementNamespace,
    ) -> bool;
    fn AllowProcessingInstruction(
        &self,
        pi: StringOrSanitizerProcessingInstruction,
    ) -> bool;
    fn RemoveProcessingInstruction(
        &self,
        pi: StringOrSanitizerProcessingInstruction,
    ) -> bool;
    fn AllowAttribute(
        &self,
        attribute: StringOrSanitizerAttributeNamespace,
    ) -> bool;
    fn RemoveAttribute(
        &self,
        attribute: StringOrSanitizerAttributeNamespace,
    ) -> bool;
    fn SetComments(&self, allow: bool) -> bool;
    fn SetDataAttributes(&self, allow: bool) -> bool;
    fn RemoveUnsafe(&self) -> bool;
    fn Constructor(
        cx: &mut JSContext,
        global: &D::Window,
        proto: Option<HandleObject<'_>>,
        configuration: SanitizerConfigOrSanitizerPresets,
    ) -> Fallible<DomRoot<D::Sanitizer>>;
}

Required Methods§

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§