feat: add displayFrequency to Display object (#26472)
This commit is contained in:
parent
f65db1df79
commit
6f6c1b7ca6
3 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
* `colorSpace` String - represent a color space (three-dimensional object which contains all realizable color combinations) for the purpose of color conversions
|
||||
* `colorDepth` Number - The number of bits per pixel.
|
||||
* `depthPerComponent` Number - The number of bits per color component.
|
||||
* `displayFrequency` Number - The display refresh rate.
|
||||
* `bounds` [Rectangle](rectangle.md)
|
||||
* `size` [Size](size.md)
|
||||
* `workArea` [Rectangle](rectangle.md)
|
||||
|
|
|
@ -151,6 +151,7 @@ v8::Local<v8::Value> Converter<display::Display>::ToV8(
|
|||
dict.Set("colorSpace", val.color_spaces().GetRasterColorSpace().ToString());
|
||||
dict.Set("depthPerComponent", val.depth_per_component());
|
||||
dict.Set("size", val.size());
|
||||
dict.Set("displayFrequency", val.display_frequency());
|
||||
dict.Set("workAreaSize", val.work_area_size());
|
||||
dict.Set("scaleFactor", val.device_scale_factor());
|
||||
dict.Set("rotation", val.RotationAsDegree());
|
||||
|
|
|
@ -30,6 +30,7 @@ describe('screen module', () => {
|
|||
expect(display).to.have.property('depthPerComponent').that.is.a('number');
|
||||
expect(display).to.have.property('colorDepth').that.is.a('number');
|
||||
expect(display).to.have.property('colorSpace').that.is.a('string');
|
||||
expect(display).to.have.property('displayFrequency').that.is.a('number');
|
||||
});
|
||||
|
||||
it('has a size object property', function () {
|
||||
|
|
Loading…
Reference in a new issue