mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
jsdom: add Path2D API, All CanvasRenderingContext2D methods (except image methods) (#12404)
This commit is contained in:
parent
852d85b3a9
commit
d8f971ffb5
6 changed files with 413 additions and 4 deletions
|
@ -36,3 +36,12 @@ pub fn (elem HTMLCanvasElement) get_context(ctx_ string) ContextResult {
|
|||
|
||||
return res
|
||||
}
|
||||
|
||||
pub fn (elem HTMLCanvasElement) get_context_2d() CanvasRenderingContext2D {
|
||||
mut res := CanvasRenderingContext2D{}
|
||||
#let ctx = elem.node.getContext('2d');
|
||||
#res = new jsdom__CanvasRenderingContext2D(ctx);
|
||||
#res.ctx = ctx;
|
||||
|
||||
return res
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue