Open
Description
What
The injected script should not depend on global JavaScript objects, such as Set
and Map
.
Why
Websites under test can overwrite these objects, leading to unexpected behavior.
Example
One website can overwrite Set
with a simple function like this:
function Set() {
...
}
The injected script would then use the function above while it was expecting a native Set object here, leading to unexpected issues, like throwing exceptions when it shouldn't have.