mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
js: add fixes for generic structures and functions; add promise API; refactor modules (#12575)
This commit is contained in:
parent
ac3910b8c2
commit
f584e70cf2
11 changed files with 1170 additions and 54 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue