electron/spec-main/fixtures/remote/remote-object-set.js

12 lines
244 B
JavaScript
Raw Normal View History

2020-03-20 20:28:31 +00:00
const { BrowserWindow } = require('electron');
class Foo {
2020-07-09 04:19:49 +00:00
set bar (value) { // eslint-disable-line accessor-pairs
if (!(value instanceof BrowserWindow)) {
2020-03-20 20:28:31 +00:00
throw new Error('setting error');
}
}
}
2020-03-20 20:28:31 +00:00
module.exports = new Foo();