feat: add new imageAnimationPolicy webpref and webContents setter (#29095)
This commit is contained in:
parent
79cb5144ae
commit
8446ce1fc7
7 changed files with 51 additions and 0 deletions
|
@ -1923,6 +1923,20 @@ when the page becomes backgrounded. This also affects the Page Visibility API.
|
|||
|
||||
Returns `String` - the type of the webContent. Can be `backgroundPage`, `window`, `browserView`, `remote`, `webview` or `offscreen`.
|
||||
|
||||
#### `contents.setImageAnimationPolicy(policy)`
|
||||
|
||||
* `policy` String - Can be `animate`, `animateOnce` or `noAnimation`.
|
||||
|
||||
Sets the image animation policy for this webContents. The policy only affects
|
||||
_new_ images, existing images that are currently being animated are unaffected.
|
||||
This is a known limitation in Chromium, you can force image animation to be
|
||||
recalculated with `img.src = img.src` which will result in no network traffic
|
||||
but will update the animation policy.
|
||||
|
||||
This corresponds to the [animationPolicy][] accessibility feature in Chromium.
|
||||
|
||||
[animationPolicy]: https://developer.chrome.com/docs/extensions/reference/accessibilityFeatures/#property-animationPolicy
|
||||
|
||||
### Instance Properties
|
||||
|
||||
#### `contents.audioMuted`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue