Documentation
¶
Overview ¶
Package runtimeenv resolves process-local performance policy from runtime facts. Gates choose equivalent implementations; they do not grant capabilities or change stored formats. Unknown environments retain the baseline policy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine string
Engine identifies the executing browser engine, independent of browser brand.
const ( // EngineUnknown includes native hosts and unrecognized JavaScript hosts. EngineUnknown Engine = "unknown" // EngineChromium identifies Blink-based Chromium hosts, including Electron. EngineChromium Engine = "chromium" // EngineWebKit identifies Safari and other WebKit hosts. EngineWebKit Engine = "webkit" )
type Environment ¶
type Environment struct {
// Engine identifies the host's browser engine.
Engine Engine
}
Environment contains immutable runtime facts used to resolve feature policy.
func Current ¶
func Current() Environment
Current retains baseline performance policy on native hosts.
func (Environment) Enabled ¶
func (e Environment) Enabled(feature Feature) bool
Enabled resolves a feature for this environment. Unknown features stay disabled.
Click to show internal directories.
Click to hide internal directories.