1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2024-11-25 09:49:36 +01:00

Remove 'disabled' check from setDeleteAttr

This commit is contained in:
Jan Andrle 2023-09-19 13:40:18 +02:00
parent 864e349a1b
commit 7196698b46
Signed by: jaandrle
GPG Key ID: B3A25AED155AFFAB

View File

@ -3,7 +3,7 @@ import { prop_process } from './src/dom-common.js';
const { setDeleteAttr }= prop_process; const { setDeleteAttr }= prop_process;
/** @param {HTMLElement} obj */ /** @param {HTMLElement} obj */
prop_process.setDeleteAttr= function(obj, prop, value){ prop_process.setDeleteAttr= function(obj, prop, value){
if("checked"!==prop && "disabled"!==prop) return setDeleteAttr(obj, prop, value); if("checked"!==prop) return setDeleteAttr(obj, prop, value);
if(value) return obj.setAttribute(prop, ""); if(value) return obj.setAttribute(prop, "");
obj.removeAttribute(prop); obj.removeAttribute(prop);
}; };