mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
jsdom, checker: add more methods for CanvasRenderingContext2D, fix interop check for JS methods (#12372)
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
module jsdom
|
||||
|
||||
import jsdom.ctx
|
||||
|
||||
pub struct HTMLCanvasElement {
|
||||
HTMLElement
|
||||
}
|
||||
@@ -31,10 +29,10 @@ pub fn (elem HTMLCanvasElement) add_event_listener(event string, cb EventCallbac
|
||||
#});
|
||||
}
|
||||
|
||||
pub fn (elem HTMLCanvasElement) get_context(ctx_ string) ctx.ContextResult {
|
||||
mut res := ctx.NoneContext{}
|
||||
pub fn (elem HTMLCanvasElement) get_context(ctx_ string) ContextResult {
|
||||
mut res := NoneContext{}
|
||||
#let ctx = elem.node.getContext(ctx_.str);
|
||||
#if (ctx instanceof CanvasRenderingContext2D) { res = new jsdom__ctx__CanvasRenderingContext2D(ctx); res.ctx = ctx; }
|
||||
#if (ctx instanceof CanvasRenderingContext2D) { res = new jsdom__CanvasRenderingContext2D(ctx); res.ctx = ctx; }
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user