js: mark Event constructor as native for stealth compatibility
Mark the Event constructor as native so that Event.toString() returns "[native code]" instead of leaking the JavaScript implementation. This closes a stealth fingerprinting vector.
This commit is contained in:
1 file changed
+1
Vendored
+1
@@ -4023,6 +4023,7 @@ globalThis.Event = class Event {
|
||||
return path;
|
||||
}
|
||||
};
|
||||
_markNative(Event);
|
||||
globalThis.CustomEvent = class extends Event {
|
||||
constructor(t,o={}) { super(t,o);this.detail=o.detail; }
|
||||
// Legacy DOM Level 2 init; some libraries (Starbucks China bundle, older
|
||||
|
||||
Reference in new issue
Block a user