Add download flag to click action, update dom logic (#310)

This commit is contained in:
Kerem Yilmaz
2024-05-13 22:18:42 -07:00
committed by GitHub
parent a4ed6de34c
commit 9f1c679e09
4 changed files with 31 additions and 5 deletions

View File

@@ -26,6 +26,7 @@ RESERVED_ATTRIBUTES = {
"aria-role",
"aria-selected", # for option tag
"checked",
"data-original-title", # for bootstrap tooltip
"data-ui",
"for",
"href", # For a tags
@@ -373,7 +374,7 @@ def _trimmed_attributes(tag_name: str, attributes: dict) -> dict:
new_attributes[key] = attributes[key]
if key == "role" and attributes[key] in ["listbox", "option"]:
new_attributes[key] = attributes[key]
if key in RESERVED_ATTRIBUTES:
if key in RESERVED_ATTRIBUTES and attributes[key]:
new_attributes[key] = attributes[key]
return new_attributes