abort-on-property-read
The abort-on-property-read snippet patches a property on the window object that aborts execution when the property is read. No error gets printed to the console.
Only use this snippet for read properties. Place it just inside the script you want to abort, otherwise, an error will be thrown.
Parameters
|
Name |
Description |
Mandatory |
|---|---|---|
|
property |
The name of the property or path to the property (chain of properties separated by dots for sub-properties). |
Yes |
|
setConfigurable |
Value of the configurable attribute of the descriptor. Defaults to true. Setting to false prevents the property from being overwritten. |
No |
Filter examples
|
Filter |
Result |
|---|---|
|
|
The code that reads/calls the |
|
|
The code that reads/calls the |
|
|
The code that reads/calls the |
Debugging
|
Message |
When |
Definition |
|---|---|---|
|
|
Beginning of execution |
No |
|
|
Each time property is read |
The error is about to be thrown. |
|
|
Before attaching to property |
Snippet is taking over the property getter/setter. |
Tradeoffs
-
The snippet is executed after all a page's inline scripts. Attach only properties read inside of a callback.
-
You can only attach this snippet to global properties, or properties of the
windowobject.