v/vlib/builtin/js/jsfns_browser.js.v

60 lines
1.7 KiB
V
Raw Normal View History

2022-01-04 10:21:08 +01:00
// Copyright (c) 2019-2022 Alexander Medvednikov. All rights reserved.
2020-06-20 13:22:49 +02: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 13:22:49 +02: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 13:22:49 +02:00
// fn JS.departFocus(NavigationReason, FocusNavigationOrigin)
fn JS.focus()
2020-06-20 13:22:49 +02: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)
2020-06-20 13:22:49 +02:00
// fn JS.open(string, string, string, bool) ?Window
// 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 13:22:49 +02:00
// fn JS.scroll(ScrollToOptions)
fn JS.scroll(int, int)
// fn JS.scrollBy(ScrollToOptions)
2020-06-20 13:22:49 +02:00
fn JS.scrollBy(int, int)
2020-06-20 13:22:49 +02:00
// fn JS.scrollTo(ScrollToOptions)
fn JS.scrollTo(int, int)
fn JS.stop()