js

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package js is the JavaScript engine package tsx runs apps on: goja on every target but the web, where the page's own engine runs them (browser.go). Its API is goja's, so on goja it is goja's types under other names, and the browser's implements the part tsx uses.

Index

Constants

View Source
const (
	PromiseStatePending   = goja.PromiseStatePending
	PromiseStateFulfilled = goja.PromiseStateFulfilled
	PromiseStateRejected  = goja.PromiseStateRejected

	FLAG_TRUE  = goja.FLAG_TRUE
	FLAG_FALSE = goja.FLAG_FALSE
)
View Source
const Browser = false

Browser reports whether apps run on the page's engine.

Variables

View Source
var (
	New                  = goja.New
	Undefined            = goja.Undefined
	Null                 = goja.Null
	IsUndefined          = goja.IsUndefined
	IsNull               = goja.IsNull
	AssertFunction       = goja.AssertFunction
	AssertConstructor    = goja.AssertConstructor
	NewSymbol            = goja.NewSymbol
	MustCompile          = goja.MustCompile
	UncapFieldNameMapper = goja.UncapFieldNameMapper
)

Functions

func Caller

func Caller(r *Runtime) (file string, line int, ok bool)

Caller is the line of JS code r runs now, through the source maps the code carries, as file and line; ok is false while r runs none.

Types

type ArrayBuffer

type ArrayBuffer = goja.ArrayBuffer

type Callable

type Callable = goja.Callable

type ConstructorCall

type ConstructorCall = goja.ConstructorCall

type Exception

type Exception = goja.Exception

type FunctionCall

type FunctionCall = goja.FunctionCall

type InterruptedError

type InterruptedError = goja.InterruptedError

type Object

type Object = goja.Object

type Program

type Program = goja.Program

type Promise

type Promise = goja.Promise

type PromiseState

type PromiseState = goja.PromiseState

type Runtime

type Runtime = goja.Runtime

type StackOverflowError

type StackOverflowError = goja.StackOverflowError

type Symbol

type Symbol = goja.Symbol

type Value

type Value = goja.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL