Expand description
Page init script for the fingerprint surfaces CDP cannot override.
Everything here is strictly worse than a browser-enforced override: a
JavaScript patch is visible to anyone who inspects the property descriptor
carefully enough, and it does not reach workers or HTTP headers. It exists
only for fields the Emulation domain has no command for, and for
connecting to a browser somebody else launched, where the switches can no
longer be changed.
The payload itself is not written here. init_payload.js next to this
module is a byte-for-byte copy of js/src/fingerprint/init-payload.js, kept
in step by scripts/check-shared-fingerprint-assets.sh, so all three
implementations send Chrome the same script rather than three hand-written
translations of it.
Structs§
- Init
Script Options - What the init script still has to patch after the CDP overrides.
Constants§
- FINGERPRINT_
PAYLOAD_ SOURCE - The shared payload source, embedded at compile time.
Functions§
- build_
fingerprint_ init_ script - Serialize the init script for a profile, or
Nonewhen none is needed. - build_
init_ script_ config - Decide what the init script still has to do after the CDP overrides.