add disabled attr to element (#860)

This commit is contained in:
Shuchang Zheng
2024-09-19 16:54:40 -07:00
committed by GitHub
parent ffaf3ab454
commit 9a386c07b5
2 changed files with 3 additions and 1 deletions

View File

@@ -938,7 +938,8 @@ function buildElementObject(frame, element, interactable, purgeable = false) {
attr.name === "selected" ||
attr.name === "aria-selected" ||
attr.name === "readonly" ||
attr.name === "aria-readonly"
attr.name === "aria-readonly" ||
attr.name === "disabled"
) {
if (attrValue && attrValue.toLowerCase() === "false") {
attrValue = false;

View File

@@ -30,6 +30,7 @@ RESERVED_ATTRIBUTES = {
"checked",
"data-original-title", # for bootstrap tooltip
"data-ui",
"disabled", # for button
"for",
"href", # For a tags
"maxlength",