pub trait OffscreenCanvasMethods<D: DomTypes> {
    // Required methods
    fn Width(&self) -> u64;
    fn SetWidth(&self, value: u64);
    fn Height(&self) -> u64;
    fn SetHeight(&self, value: u64);
    fn GetContext(
        &self,
        cx: SafeJSContext,
        contextId: DOMString,
        options: HandleValue<'_>,
    ) -> Result<Option<OffscreenCanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContext>, Error>;
    fn Constructor(
        global: &GlobalScope,
        proto: Option<HandleObject<'_>>,
        can_gc: CanGc,
        width: u64,
        height: u64,
    ) -> Result<Root<Dom<OffscreenCanvas>>, Error>;
}

Required Methods§

Object Safety§

This trait is not object safe.

Implementors§