JavaScript Restrictor
Browser extension that improves privacy and security
Loading...
Searching...
No Matches
wrappingS-DOM.js File Reference

This file contains wrappers for the DOM API. More...

Functions

 if (doNoise===true)
 

Variables

var doNoise = args[1]
 
var pastValues = {}
 
 $
 
var wrappers
 

Detailed Description

This file contains wrappers for the DOM API.

See also
https://dom.spec.whatwg.org/
Author
Copyright (C) 2021 Libor Polcak
License:
SPDX-License-Identifier: GPL-3.0-or-later

The events carry timestamp of their creation. As we allow wrapping of several ways to obtain timestamps, we need to provide the same precision for the Event API.

Function Documentation

◆ if()

if (   doNoise = == true)

Variable Documentation

◆ $

$
Initial value:
var mitigationF = rounding_function
$
Definition wrappingS-DOM.js:37
var rounding_function
Definition wrapping.js:59
var noise_function
Definition wrapping.js:66

◆ doNoise

var doNoise = args[1]

◆ pastValues

var pastValues = {}

◆ wrappers

var wrappers
Initial value:
= [
{
parent_object: "Event.prototype",
parent_object_property: "timeStamp",
wrapped_objects: [],
helping_code: remember_past_values + `let origGet = Object.getOwnPropertyDescriptor(Event.prototype, "timeStamp").get`,
post_wrapping_code: [
{
code_type: "object_properties",
parent_object: "Event.prototype",
parent_object_property: "timeStamp",
wrapped_objects: [],
wrapped_properties: [
{
property_name: "get",
property_value: `
function() {
return mitigationF(origGet.call(this), precision);
}`,
},
],
}
],
},
]
var wrappers
Definition wrappingS-DOM.js:52
var helping_code
Definition wrappingS-H-C.js:86
function add_wrappers(wrappers)
Definition wrapping.js:50