Skip to content

Commit 24ef0b1

Browse files
committed
[FIX] switch e.path to e.composedPath
1 parent 2f25e34 commit 24ef0b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/scripts/settings.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,14 @@ function addDomainToEditableListBox(entity, elementId, actionEdit, actionDelete,
444444
}
445445

446446
function deleteBlackSite(e) {
447-
var targetElement = e.path[1];
447+
var targetElement = e.composedPath()[1];
448448
blackList.splice(blackList.indexOf(targetElement.innerText), 1);
449449
document.getElementById('blackList').removeChild(targetElement);
450450
updateBlackList();
451451
}
452452

453453
function deleteRestrictionSite(e) {
454-
var targetElement = e.path[1];
454+
var targetElement = e.composedPath()[1];
455455
var itemValue = targetElement.querySelector("[name='domain']").value;
456456
var item = restrictionList.find(x => x.domain == itemValue);
457457
restrictionList.splice(restrictionList.indexOf(item), 1);
@@ -460,7 +460,7 @@ function deleteRestrictionSite(e) {
460460
}
461461

462462
function deleteNotificationSite(e) {
463-
var targetElement = e.path[1];
463+
var targetElement = e.composedPath()[1];
464464
var itemValue = targetElement.querySelector("[name='domain']").value;
465465
var item = notifyList.find(x => x.domain == itemValue);
466466
notifyList.splice(notifyList.indexOf(item), 1);
@@ -469,7 +469,7 @@ function deleteNotificationSite(e) {
469469
}
470470

471471
function actionEditSite(e, actionUpdateTimeFromList, actionUpdateList) {
472-
var targetElement = e.path[1];
472+
var targetElement = e.composedPath()[1];
473473
var domainElement = targetElement.querySelector('[name="domain"]');
474474
var timeElement = targetElement.querySelector('[name="time"]');
475475
if (timeElement.classList.contains('clock-li-readonly')) {

0 commit comments

Comments
 (0)