Lightcord/modules/discord_desktop_core/core/app/discord_native/renderer/features.js

22 lines
436 B
JavaScript
Raw Normal View History

2020-12-12 11:56:28 +01:00
"use strict";
2020-06-27 21:02:48 +02:00
const electron = require('electron');
2020-12-12 11:56:28 +01:00
const {
FEATURES_GET_BROWSER_FEATURES
} = require('../common/constants').IPCEvents;
2020-06-27 21:02:48 +02:00
let supportedFeatures = new Set(electron.ipcRenderer.sendSync(FEATURES_GET_BROWSER_FEATURES));
function supports(feature) {
return supportedFeatures.has(feature);
}
function declareSupported(feature) {
supportedFeatures.add(feature);
}
module.exports = {
supports,
declareSupported
};