mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
js: add fixes for generic structures and functions; add promise API; refactor modules (#12575)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import jsdom
|
||||
import js.dom
|
||||
|
||||
fn get_canvas(elem JS.HTMLElement) &JS.HTMLCanvasElement {
|
||||
match elem {
|
||||
@ -30,8 +30,8 @@ mut:
|
||||
}
|
||||
|
||||
fn main() {
|
||||
window := jsdom.window()
|
||||
document := jsdom.document
|
||||
window := dom.window()
|
||||
document := dom.document
|
||||
clear_btn := document.getElementById('clearButton'.str) ?
|
||||
canvas_elem := document.getElementById('canvas'.str) ?
|
||||
canvas := get_canvas(canvas_elem)
|
||||
|
Reference in New Issue
Block a user