Skip to content

Commit

Permalink
build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
skocheri committed Oct 16, 2020
1 parent 9a20eaf commit 0aec7ea
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions modules/idLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,21 @@ function targetAction(conf, mutations, observer) {
function addInputElementsElementListner(conf) {
logInfo('Adding input element listeners');
const inputs = document.querySelectorAll('input[type=text], input[type=email]');
for (const input of Array.from(inputs)) {
logInfo(` Original Value in Input = ${input.value}`);
input.addEventListener('change', event => processInputChange(event, conf));
input.addEventListener('blur', event => processInputChange(event, conf));

for (var i = 0; i < inputs.length; i++) {
logInfo(` Original Value in Input = ${inputs[i].value}`);
inputs[i].addEventListener('change', event => processInputChange(event, conf));
inputs[i].addEventListener('blur', event => processInputChange(event, conf));
}
}

function removeInputElementsElementListner(conf) {
logInfo('Removing input element listeners');
const inputs = document.querySelectorAll('input[type=text], input[type=email]');
for (const input of Array.from(inputs)) {
input.removeEventListener('change', event => processInputChange(event, conf));
input.removeEventListener('blur', event => processInputChange(event, conf));

for (var i = 0; i < inputs.length; i++) {
inputs[i].removeEventListener('change', event => processInputChange(event, conf));
inputs[i].removeEventListener('blur', event => processInputChange(event, conf));
}
}

Expand Down

0 comments on commit 0aec7ea

Please sign in to comment.