diff --git a/jsdom.js b/jsdom.js index f1ec7fb..207505b 100644 --- a/jsdom.js +++ b/jsdom.js @@ -3,9 +3,9 @@ import { prop_process } from './src/dom-common.js'; const { setDeleteAttr }= prop_process; /** @param {HTMLElement} obj */ prop_process.setDeleteAttr= function(obj, prop, value){ - if("checked"!==prop) return setDeleteAttr(obj, prop, value); - if(value) return obj.setAttribute("checked", ""); - obj.removeAttribute("checked"); + if("checked"!==prop && "disabled"!==prop) return setDeleteAttr(obj, prop, value); + if(value) return obj.setAttribute(prop, ""); + obj.removeAttribute(prop); }; const keys= [ "HTMLElement", "SVGElement", "DocumentFragment", "MutationObserver", "document" ]; let dom_last;