mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add canvas usability checks to drawImage()
This commit is contained in:
parent
ed0973fb1c
commit
423b86e439
5 changed files with 14 additions and 13 deletions
|
@ -138,6 +138,10 @@ impl OffscreenCanvas {
|
|||
));
|
||||
Some(context)
|
||||
}
|
||||
|
||||
pub fn is_valid(&self) -> bool {
|
||||
self.Width() != 0 && self.Height() != 0
|
||||
}
|
||||
}
|
||||
|
||||
impl OffscreenCanvasMethods for OffscreenCanvas {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue