Skip to main content

PerformanceObserverMethods

pub trait PerformanceObserverMethods<D: DomTypes> {
    // Required methods
    fn Observe(
        &self,
        cx: &mut JSContext,
        options: &PerformanceObserverInit,
    ) -> Fallible<()>;
    fn Disconnect(&self, cx: &mut JSContext);
    fn TakeRecords(&self) -> Vec<DomRoot<D::PerformanceEntry>> ;
    fn SupportedEntryTypes(
        cx: &mut JSContext,
        global: &D::GlobalScope,
        retval: MutableHandle<'_, Value>,
    );
    fn Constructor(
        cx: &mut JSContext,
        global: &D::GlobalScope,
        proto: Option<HandleObject<'_>>,
        callback: Rc<PerformanceObserverCallback<D>>,
    ) -> Fallible<DomRoot<D::PerformanceObserver>>;
}

Required Methods§

Source

fn Observe( &self, cx: &mut JSContext, options: &PerformanceObserverInit, ) -> Fallible<()>

Source

fn Disconnect(&self, cx: &mut JSContext)

Source

fn TakeRecords(&self) -> Vec<DomRoot<D::PerformanceEntry>>

Source

fn SupportedEntryTypes( cx: &mut JSContext, global: &D::GlobalScope, retval: MutableHandle<'_, Value>, )

Source

fn Constructor( cx: &mut JSContext, global: &D::GlobalScope, proto: Option<HandleObject<'_>>, callback: Rc<PerformanceObserverCallback<D>>, ) -> Fallible<DomRoot<D::PerformanceObserver>>

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§