1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-16 23:42:39 +01:00

Update call-nothrow

MasterKia 2023-03-25 14:35:40 +03:30
parent 225bf0832b
commit 9d7813db0f

@ -257,6 +257,19 @@ Parameters:
New in [1.48.1b0](https://github.com/gorhill/uBlock/commit/e93117cbb607472a830e1c0653dfbddde4c965fc).
Prevents a call to an existing function from throwing an exception.
It encloses existing functions in this block and ignores the exception:
```js
try {
[existing function]
}
catch() {
[ignore when throws]
}
```
It will return `undefined` because returning variable is never set.
The exception will be caught by the scriptlet and neutralized. The first argument must be a reference to a function call. At the moment, the function call must exist at the time the scriptlet is called.