feat: add contents.getBackgroundThrottling() + backgroundThrottling property (#21036)

This commit is contained in:
Milan Burda 2020-05-14 15:11:45 +02:00 committed by GitHub
parent 7656480247
commit 4afc756094
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 59 additions and 0 deletions

View file

@ -587,6 +587,11 @@ WebContents.prototype._init = function () {
get: () => this.getFrameRate(),
set: (rate) => this.setFrameRate(rate)
});
Object.defineProperty(this, 'backgroundThrottling', {
get: () => this.getBackgroundThrottling(),
set: (allowed) => this.setBackgroundThrottling(allowed)
});
};
// Public APIs.