@acanto/core-dom
Advanced tools
Comparing version 0.0.17 to 0.0.18
12
index.ts
@@ -120,3 +120,3 @@ /** | ||
if (!el) { | ||
console.error("Used `addClass` with an unexisting DOM element"); | ||
console.warn("Used `addClass` with an unexisting DOM element"); | ||
return; | ||
@@ -137,3 +137,3 @@ } | ||
if (!el) { | ||
console.error("Used `removeClass` with an unexisting DOM element"); | ||
console.warn("Used `removeClass` with an unexisting DOM element"); | ||
return; | ||
@@ -198,7 +198,7 @@ } | ||
if (!el) { | ||
console.error("Used `on` with an unexisting DOM element"); | ||
console.warn("Used `on` with an unexisting DOM element"); | ||
return; | ||
} | ||
} | ||
el.addEventListener(type, handler, options); | ||
if (el) el.addEventListener(type, handler, options); | ||
} | ||
@@ -222,7 +222,7 @@ | ||
if (!el) { | ||
console.error("Used `on` with an unexisting DOM element"); | ||
console.warn("Used `off` with an unexisting DOM element"); | ||
return; | ||
} | ||
} | ||
el.removeEventListener(type, handler, options); | ||
if (el) el.removeEventListener(type, handler, options); | ||
} | ||
@@ -229,0 +229,0 @@ |
{ | ||
"name": "@acanto/core-dom", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"author": "Acanto <info@acanto.net> (https://acanto.agency/)", | ||
@@ -18,3 +18,3 @@ "license": "ISC", | ||
"sideEffects": false, | ||
"gitHead": "f31e5fb27fe94c35b5543531363ae25aa437b718" | ||
"gitHead": "4a535ee9ef1c6303220803d4a9e04c1ef1a18080" | ||
} |
24361