Closed
Description
When the developer tool opens, it automatically reads the 'splice' property of most object types on the console and triggers the getter.
This feature can be used for interference with developer tools and can not be prevented by scripting.
For example:
console.log({
get splice(){
location.replace('about:blank')
//If the console is already open, the splice property of this object will be read and redirected to an empty page.
}
})
A similar problem exists with the code debugger:
!function(){
var o={get splice(){location.replace('about:blank')}};
debugger //When you debug here, redirection is triggered by reading the splice property to the object in scope.
}()
(There is no such bug in Firefox.)
AB#47199348