Open Bug 1543199 Opened 5 years ago Updated 2 years ago

Autocomplete runs proxy traps

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: Oriol, Unassigned)

Details

Run this code in the console:

var obj = {get getter(){ console.log("Access detected!") }};
var proxy = new Proxy({}, {ownKeys(){ console.log("Access detected!") }});

Type obj.getter., you are asked whether you want to run the getter or not.

That's great, but now type proxy., you will immediately see Access detected! without being prompted.

Running proxy traps can have undesirable side-effects, the same prompt as for getters should appear.

Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.