abort-current-inline-script
This snippet aborts the execution of an inline script when a property is either read or written.
Parameters
Name | Description | Mandatory |
---|---|---|
api | The API function or property name to anchor on. It can also be the path to that property. If the property is a direct child of | Yes |
search | If specified, only scripts containing the given string are prevented from executing. If the string begins and ends with a slash ( | No |
Filter examples
The following table lists examples that use the abort-current-inline-script
filter:
Filter | Result |
---|---|
| The code that calls/writes the |
| The code that calls/writes the |
| The code that reads/writes the This example shows that you can attach the filter to |
| The code that calls/writes the |
| The code that calls/writes the |
Tradeoffs
Keep the following tradeoffs in mind when you use the abort-current-inline-script
filter:
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
window
object.
Last updated