1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/builtin/js/jsfns_browser.js.v

60 lines
1.7 KiB
V
Raw Permalink Normal View History

2023-03-28 23:55:57 +03:00
// Copyright (c) 2019-2023 Alexander Medvednikov. All rights reserved.
2020-06-20 14:22:49 +03:00
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
// This file contains JS functions only present in the browser.
// They have been ported from their TypeScript definitions.
module builtin
// Window
fn JS.atob(string) string
fn JS.btoa(string) string
fn JS.clearInterval(int)
fn JS.clearTimeout(int)
// fn JS.createImageBitmap(ImageBitmapSource, ImageBitmapOptions) Promise<ImageBitmap>
// fn JS.createImageBitmap(ImageBitmapSource, int, int, int, int, ImageBitmapOptions) Promise<ImageBitmap>
// TODO: js async attribute
// [js_async]
// fn JS.fetch(RequestInfo, RequestInit) Promise<Response>
fn JS.queueMicrotask(fn ())
2020-06-20 14:22:49 +03:00
fn JS.setInterval(any, int, ...any) int
fn JS.setTimeout(any, int, ...any) int
fn JS.alert(any)
fn JS.blur()
fn JS.captureEvents()
fn JS.close()
fn JS.confirm(string) bool
2020-06-20 14:22:49 +03:00
// fn JS.departFocus(NavigationReason, FocusNavigationOrigin)
fn JS.focus()
2020-06-20 14:22:49 +03:00
// fn JS.getComputedStyle(Element, string | null) CSSStyleDeclaration
// fn JS.getMatchedCSSRules(Element, string | null) CSSRuleList
// fn JS.getSelection() Selection | null
// fn JS.matchMedia(string) MediaQueryList
fn JS.moveBy(int, int)
fn JS.moveTo(int, int)
fn JS.msWriteProfilerMark(string)
// fn JS.open(string, string, string, bool)?Window
2020-06-20 14:22:49 +03:00
// fn JS.postMessage(any, string, []Transferable)
fn JS.print()
fn JS.prompt(string, string) ?string
fn JS.releaseEvents()
fn JS.resizeBy(int, int)
fn JS.resizeTo(int, int)
2020-06-20 14:22:49 +03:00
// fn JS.scroll(ScrollToOptions)
fn JS.scroll(int, int)
// fn JS.scrollBy(ScrollToOptions)
2020-06-20 14:22:49 +03:00
fn JS.scrollBy(int, int)
2020-06-20 14:22:49 +03:00
// fn JS.scrollTo(ScrollToOptions)
fn JS.scrollTo(int, int)
fn JS.stop()