Skip to content

Commit

Permalink
Html attribute (#384)
Browse files Browse the repository at this point in the history
* fix: allow name attribute on options

* revert: fix: allow name attribute on options

* readonly on select element

* revert: readonly on select element

* revert: placeholder on textarea element

* required on textarea element
  • Loading branch information
g105b committed Aug 12, 2022
1 parent 59c9102 commit 69a86b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/HTMLElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -2007,6 +2007,7 @@ protected function __prop_get_required():bool {
$this->allowTypes(
ElementType::HTMLButtonElement,
ElementType::HTMLInputElement,
ElementType::HTMLTextAreaElement,
);
return $this->hasAttribute("required");
}
Expand All @@ -2015,6 +2016,7 @@ protected function __prop_set_required(bool $value):void {
$this->allowTypes(
ElementType::HTMLButtonElement,
ElementType::HTMLInputElement,
ElementType::HTMLTextAreaElement,
);
if($value) {
$this->setAttribute("required", "");
Expand Down

0 comments on commit 69a86b6

Please sign in to comment.