override-property-read
The override-property-read
snippet overrides a property's value on the window
object with a set of available properties.
You can use the override-property-read
snippet to change the value of global properties.
Parameters
Name | Description | Mandatory |
---|---|---|
property | The name of the property or path to the property. If the property is a direct child of | Yes |
value | The value to override the property with. | Yes |
setConfigurable | Value of the configurable attribute of the descriptor of property. If this parameter is not used it defaults to true. Setting it to false will prevent the property set and get being overwritten or otherwise changed by anybody. If this snippet doesn't work as expected when passing only the property and the value, it could mean that the website is circumventing and setting this parameter to false can come in handy. | No |
Possible override values
Value | Definition |
---|---|
undefined | |
false | |
true | |
null | |
" " | An empty string |
decimal integer | |
| A function with an empty body |
| A function that returns |
| An array with no elements |
| An object with no properties |
Filter examples
The following table lists examples that use the override-property-read
snippet:
Filter | Result |
---|---|
|
|
|
|
|
|
|
|
Debugging
The following table contains messages you'll find useful during debugging:
Message | When the message occurs | Definition |
---|---|---|
| Each time the property is read | The property has been accessed. |
| Right before attaching to the property | This log is printed just before the snippet takes over the property getter OR setter. |
Last updated