Trait script::dom::bindings::codegen::Bindings::OffscreenCanvasBinding::OffscreenCanvas_Binding::OffscreenCanvasMethods
source · pub trait OffscreenCanvasMethods {
// 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<'_>,
) -> Option<OffscreenCanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContext>;
fn Constructor(
global: &GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
width: u64,
height: u64,
) -> Result<Root<Dom<OffscreenCanvas>>, Error>;
}
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<'_>, ) -> Option<OffscreenCanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContext>
fn Constructor( global: &GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, width: u64, height: u64, ) -> Result<Root<Dom<OffscreenCanvas>>, Error>
Object Safety§
This trait is not object safe.