1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2026-01-11 16:26:28 +01:00

🐛 update dom-common.js setDelete to setDeleteAttr

This commit is contained in:
2023-09-19 12:34:42 +02:00
parent 1df797e316
commit 78fdb45ea7
8 changed files with 386 additions and 369 deletions

View File

@@ -1,9 +1,9 @@
//TODO: https://www.npmjs.com/package/html-element
import { prop_process } from './src/dom-common.js';
const { setDelete }= prop_process;
const { setDeleteAttr }= prop_process;
/** @param {HTMLElement} obj */
prop_process.setDelete= function(obj, prop, value){
if("checked"!==prop) return setDelete(obj, prop, value);
prop_process.setDeleteAttr= function(obj, prop, value){
if("checked"!==prop) return setDeleteAttr(obj, prop, value);
if(value) return obj.setAttribute("checked", "");
obj.removeAttribute("checked");
};