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>
|
2021-03-24 21:39:59 +03:00
|
|
|
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
|
2021-03-24 21:39:59 +03:00
|
|
|
|
2020-06-20 14:22:49 +03:00
|
|
|
// fn JS.departFocus(NavigationReason, FocusNavigationOrigin)
|
|
|
|
fn JS.focus()
|
2021-03-24 21:39:59 +03:00
|
|
|
|
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)
|
2021-03-24 21:39:59 +03:00
|
|
|
|
2022-05-13 06:56:21 +03:00
|
|
|
// 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)
|
2021-03-24 21:39:59 +03:00
|
|
|
|
2020-06-20 14:22:49 +03:00
|
|
|
// fn JS.scroll(ScrollToOptions)
|
|
|
|
fn JS.scroll(int, int)
|
2021-03-24 21:39:59 +03:00
|
|
|
|
|
|
|
// fn JS.scrollBy(ScrollToOptions)
|
2020-06-20 14:22:49 +03:00
|
|
|
fn JS.scrollBy(int, int)
|
2021-03-24 21:39:59 +03:00
|
|
|
|
2020-06-20 14:22:49 +03:00
|
|
|
// fn JS.scrollTo(ScrollToOptions)
|
|
|
|
fn JS.scrollTo(int, int)
|
|
|
|
fn JS.stop()
|