Skip to main content

ResizeObserverMethods

pub trait ResizeObserverMethods<D: DomTypes> {
    // Required methods
    fn Observe(&self, target: &D::Element, options: &ResizeObserverOptions);
    fn Unobserve(&self, target: &D::Element);
    fn Disconnect(&self);
    fn Constructor(
        cx: &mut JSContext,
        global: &D::Window,
        proto: Option<HandleObject<'_>>,
        callback: Rc<ResizeObserverCallback<D>>,
    ) -> DomRoot<D::ResizeObserver>;
}

Required Methods§

Source

fn Observe(&self, target: &D::Element, options: &ResizeObserverOptions)

Source

fn Unobserve(&self, target: &D::Element)

Source

fn Disconnect(&self)

Source

fn Constructor( cx: &mut JSContext, global: &D::Window, proto: Option<HandleObject<'_>>, callback: Rc<ResizeObserverCallback<D>>, ) -> DomRoot<D::ResizeObserver>

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§