In my electron application, I have the following code setup. It all starts with:
app.on('ready', createWindow);
function createWindow() {
window.loadURL(url.format({
pathname: path.join(__dirname, 'technical/views/highlightRules.html'),
protocol: 'file:',
slashes: true
}));
}
The content of my highlightRules.html file includes:
<script type="text/javascript" src="../../ioadapters/controllers/HighlightRulesController.js"></script>
...
<textarea id="lowValueSettingText" rows="8"></textarea>
Lastly, the HighlightRulesController.js contains:
function setUp() {
const lowValueSettingTextarea = document.getElementById("lowValueSettingText");
lowValueSettingTextarea.onchange = function() {
onLowValueHighlightSettingChanged();
}
}
function onLowValueHighlightSettingChanged() {
alert("test");
}
setUp();
After typing something in the textarea and losing focus, the expected alert does not show up. How can I resolve this issue?