aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlulistelement.rs
diff options
context:
space:
mode:
authorSimon Wülker <simon.wuelker@arcor.de>2024-09-04 08:17:27 +0200
committerGitHub <noreply@github.com>2024-09-04 06:17:27 +0000
commite43e4778421be8ea30db9d5c553780c042161522 (patch)
tree473481f94c3923ff9d0cc4ff0fc568be0ad1ed54 /components/script/dom/htmlulistelement.rs
parent93cd8d1ba47838832327d88f00bb26c9cc5e7d77 (diff)
downloadservo-e43e4778421be8ea30db9d5c553780c042161522.tar.gz
servo-e43e4778421be8ea30db9d5c553780c042161522.zip
Implement compact/type attributes for HTMLUListElement (#33303)
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Diffstat (limited to 'components/script/dom/htmlulistelement.rs')
-rw-r--r--components/script/dom/htmlulistelement.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/components/script/dom/htmlulistelement.rs b/components/script/dom/htmlulistelement.rs
index faa1eb97d59..b1e39d90f47 100644
--- a/components/script/dom/htmlulistelement.rs
+++ b/components/script/dom/htmlulistelement.rs
@@ -6,7 +6,9 @@ use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use js::rust::HandleObject;
+use crate::dom::bindings::codegen::Bindings::HTMLUListElementBinding::HTMLUListElementMethods;
use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
use crate::dom::document::Document;
use crate::dom::htmlelement::HTMLElement;
use crate::dom::node::Node;
@@ -43,3 +45,17 @@ impl HTMLUListElement {
)
}
}
+
+impl HTMLUListElementMethods for HTMLUListElement {
+ // https://html.spec.whatwg.org/multipage/#dom-ul-compact
+ make_bool_getter!(Compact, "compact");
+
+ // https://html.spec.whatwg.org/multipage/#dom-ul-compact
+ make_bool_setter!(SetCompact, "compact");
+
+ // https://html.spec.whatwg.org/multipage/#dom-ul-type
+ make_getter!(Type, "type");
+
+ // https://html.spec.whatwg.org/multipage/#dom-ul-type
+ make_setter!(SetType, "type");
+}