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

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

Functions

 if (doNoise===true) {redefineNewArrayFunctions}
 

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) {redefineNewArrayFunctions}

Variable Documentation

◆ 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:84
function add_wrappers(wrappers)
Definition: wrapping.js:56