pub(crate) trait OffscreenCanvasMethods<D: DomTypes> {
// Required methods
fn Width(&self) -> u64;
fn SetWidth(&self, value: u64, _can_gc: CanGc);
fn Height(&self) -> u64;
fn SetHeight(&self, value: u64, _can_gc: CanGc);
fn GetContext(
&self,
cx: SafeJSContext,
contextId: DOMString,
options: HandleValue<'_>,
_can_gc: CanGc,
) -> Fallible<Option<OffscreenCanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContext<D>>>;
fn Constructor(
global: &D::GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
width: u64,
height: u64,
) -> Fallible<DomRoot<D::OffscreenCanvas>>;
}
Required Methods§
fn Width(&self) -> u64
fn SetWidth(&self, value: u64, _can_gc: CanGc)
fn Height(&self) -> u64
fn SetHeight(&self, value: u64, _can_gc: CanGc)
fn GetContext( &self, cx: SafeJSContext, contextId: DOMString, options: HandleValue<'_>, _can_gc: CanGc, ) -> Fallible<Option<OffscreenCanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContext<D>>>
fn Constructor( global: &D::GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, width: u64, height: u64, ) -> Fallible<DomRoot<D::OffscreenCanvas>>
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.