mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
jsdom, js: start refactoring jsdom; improve JS interfaces; add two attributes for them (#12488)
This commit is contained in:
@ -397,3 +397,11 @@ pub fn (a []string) str() string {
|
||||
res := sb.str()
|
||||
return res
|
||||
}
|
||||
|
||||
pub fn (a array) to_js_array() JS.Array {
|
||||
tmp := JS.Array.prototype.constructor()
|
||||
for i in 0 .. a.len {
|
||||
tmp.push(a.arr.get(i))
|
||||
}
|
||||
return tmp
|
||||
}
|
||||
|
Reference in New Issue
Block a user