raf-if.js

gwarser 2019-09-06 15:36:13 +02:00
parent 26b8a032a4
commit 018d9b29a7

@ -146,6 +146,24 @@ Parameters:
- optional, CSS selector, specifies nodes from which attributes will be removed
***
### raf-if.js /
### ~requestAnimationFrame-if.js~ [](https://github.com/gorhill/uBlock/blob/59bdf2b4ccd1151a296af36e5536ed00eeb07fb4/assets/resources/scriptlets.js#L394)
New in [1.22.0](https://github.com/gorhill/uBlock/commit/6831967f5f9d64412a9c063f3b64104d9dce7b07)
Defuses calls to _`requestAnimationFrame()`_ function when:
- The needle **is not prefixed** with `!` and the needle **does not match** the stringified argument; OR
- The needle **is prefixed** with `!` and the needle **matches** the stringified argument.
When used without parameters, will log calls to `requestAnimationFrame()` to the console.
Parameters:
- optional, string/_regular expression_, "The needle", matching in the stringified argument passed to
requestAnimationFrame.
***
### set.js /