browser

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 31 Imported by: 4

Documentation

Overview

Package browser is the browser module's entry point, and initializer of various global types, and a translation layer between Goja and the internal business logic.

It initializes and drives the downstream components by passing the necessary concrete dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSModule

type JSModule struct {
	Browser         *goja.Object
	Devices         map[string]common.Device
	NetworkProfiles map[string]common.NetworkProfile `js:"networkProfiles"`
}

JSModule exposes the properties available to the JS script.

type ModuleInstance

type ModuleInstance struct {
	// contains filtered or unexported fields
}

ModuleInstance represents an instance of the JS module.

func (*ModuleInstance) Exports

func (mi *ModuleInstance) Exports() k6modules.Exports

Exports returns the exports of the JS module so that it can be used in test scripts.

type RootModule

type RootModule struct {
	PidRegistry *pidRegistry
	// contains filtered or unexported fields
}

RootModule is the global module instance that will create module instances for each VU.

func New

func New() *RootModule

New returns a pointer to a new RootModule instance.

func (*RootModule) NewModuleInstance

func (m *RootModule) NewModuleInstance(vu k6modules.VU) k6modules.Instance

NewModuleInstance implements the k6modules.Module interface to return a new instance for each VU.

Jump to

Keyboard shortcuts

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