Comment on page
abort-on-property-writesnippet patches a property on the
windowobject that aborts execution when the property is written or set. No error gets printed to the console.
You can use this snippet to abort the execution of inline scripts.
Only use this snippet for written properties. Place it just inside the script you want to abort, otherwise, an error will be thrown.
The following table lists examples that use the
The following table contains messages you'll find useful during debugging:
Keep the following tradeoffs in mind when you use the
- The snippet is executed after all of a page's inline scripts. As a result, you should only attach properties read inside of a callback, which can be executed after the script.
- You can only attach this snippet to global properties, or properties of the
- You should only attach to properties set just inside the script you want to abort. Otherwise, an error will be thrown.
Last modified 3mo ago