platform

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT 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 platform says which profiles share a browser's network stack, so that a profile may inherit captures from the other's: Safari on iOS from Safari on macOS (decision 0051), Chrome and Firefox on iOS from Safari of their WebKit (decision 0053). cmd/profilegen enforces it on the built-in profiles and cmd/refresh plans by it; it stays out of the public profile package, whose Validate checks only that an inherited capture is the same browser's, or Safari's for Chrome or Firefox on iOS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Engine added in v0.3.0

func Engine(browser, platform string) string

Engine is the browser whose engine and network stack browser uses on platform, from whose profiles a profile of browser on platform may also inherit captures, "" for none: Safari for Chrome and Firefox on iOS, which load pages through WebKit and Apple's network stack. Such a profile inherits only from the engine's profiles of its WebKit generation (WebKitVersion, or for a frozen user agent the iOS version it was captured on), on its own platform or the one the engine's network stack is shared with (Stack).

func Stack

func Stack(browser, platform string) string

Stack is the platform whose network stack browser shares on platform, from whose profiles a profile of browser on platform may also inherit captures (profile.Profile.CapturesFrom), "" for none: macOS for Safari on iOS.

func WebKitVersion added in v0.3.0

func WebKitVersion(userAgent string) string

WebKitVersion is the Safari version whose WebKit a browser with Engine "safari" runs, from its user agent: the iOS major version, which the system's WebKit and Safari share ("27" for "iPhone OS 27_2_0"). "" when the user agent names no iOS version, or only the frozen 18_7 (Firefox on iOS sends Safari's), which says nothing of the WebKit.

Types

This section is empty.

Jump to

Keyboard shortcuts

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