pub trait HTMLCanvasElementMethods<D: DomTypes> {
// 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>>;
}