Support align attribute on HTMLParagraphElement interface (#36054)

Signed-off-by: Stephen Muss <stephenmuss@gmail.com>
This commit is contained in:
Stephen Muss 2025-03-19 18:57:43 +11:00 committed by GitHub
parent a442a11330
commit 07e06f5635
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 122 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::HTMLParagraphElementBinding::HTMLParagraphElementMethods;
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;
@ -46,3 +48,11 @@ impl HTMLParagraphElement {
)
}
}
impl HTMLParagraphElementMethods<crate::DomTypeHolder> for HTMLParagraphElement {
// https://html.spec.whatwg.org/multipage/#dom-p-align
make_getter!(Align, "align");
// https://html.spec.whatwg.org/multipage/#dom-p-align
make_setter!(SetAlign, "align");
}