pub trait HTMLCanvasElementMethods {
    // Required methods
    fn Width(&self) -> u32;
    fn SetWidth(&self, value: u32);
    fn Height(&self) -> u32;
    fn SetHeight(&self, value: u32);
    fn GetContext(
        &self,
        cx: SafeJSContext,
        contextId: DOMString,
        options: HandleValue<'_>,
        _can_gc: CanGc,
    ) -> Option<CanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContextOrGPUCanvasContext>;
    fn ToDataURL(
        &self,
        cx: SafeJSContext,
        type_: Option<DOMString>,
        quality: HandleValue<'_>,
    ) -> Result<USVString, Error>;
    fn CaptureStream(
        &self,
        frameRequestRate: Option<Finite<f64>>,
        _can_gc: CanGc,
    ) -> Root<Dom<MediaStream>>;
}

Required Methods§

source

fn Width(&self) -> u32

source

fn SetWidth(&self, value: u32)

source

fn Height(&self) -> u32

source

fn SetHeight(&self, value: u32)

source

fn GetContext( &self, cx: SafeJSContext, contextId: DOMString, options: HandleValue<'_>, _can_gc: CanGc, ) -> Option<CanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContextOrGPUCanvasContext>

source

fn ToDataURL( &self, cx: SafeJSContext, type_: Option<DOMString>, quality: HandleValue<'_>, ) -> Result<USVString, Error>

source

fn CaptureStream( &self, frameRequestRate: Option<Finite<f64>>, _can_gc: CanGc, ) -> Root<Dom<MediaStream>>

Implementors§