script: Add longdesc reflection to HTMLIFrameElement and HTMLFrameElement (#43518)

script: Add longdesc reflection to HTMLIFrameElement and
HTMLFrameElement

Also corrects the reflection for HTMLImageElement to use USVString.

Testing: Covered by WPTs

Signed-off-by: Luke Warlow <lwarlow@igalia.com>
This commit is contained in:
Luke Warlow
2026-03-21 11:46:16 +00:00
committed by GitHub
parent 4199e050d9
commit 09b0cfce8e
10 changed files with 23 additions and 418 deletions

View File

@@ -5,8 +5,10 @@
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use js::rust::HandleObject;
use script_bindings::codegen::GenericBindings::HTMLFrameElementBinding::HTMLFrameElement_Binding::HTMLFrameElementMethods;
use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::USVString;
use crate::dom::document::Document;
use crate::dom::html::htmlelement::HTMLElement;
use crate::dom::node::Node;
@@ -45,3 +47,11 @@ impl HTMLFrameElement {
)
}
}
impl HTMLFrameElementMethods<crate::DomTypeHolder> for HTMLFrameElement {
// https://html.spec.whatwg.org/multipage/#dom-frame-longdesc
make_url_getter!(LongDesc, "longdesc");
// https://html.spec.whatwg.org/multipage/#dom-frame-longdesc
make_url_setter!(SetLongDesc, "longdesc");
}