Implement compact/type attributes for HTMLUListElement (#33303)

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2024-09-04 08:17:27 +02:00 committed by GitHub
parent 93cd8d1ba4
commit e43e477842
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 20 additions and 238 deletions

View file

@ -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");
}

View file

@ -12,8 +12,8 @@ interface HTMLUListElement : HTMLElement {
// https://html.spec.whatwg.org/multipage/#HTMLUListElement-partial
partial interface HTMLUListElement {
// [CEReactions]
// attribute boolean compact;
// [CEReactions]
// attribute DOMString type;
[CEReactions]
attribute boolean compact;
[CEReactions]
attribute DOMString type;
};