cangc fixes in node.rs (#33984)

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
chickenleaf 2024-10-24 04:14:50 +05:30 committed by GitHub
parent 3ed778150f
commit bb4932026c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
97 changed files with 1038 additions and 534 deletions

View file

@ -42,6 +42,7 @@ impl HTMLAudioElement {
prefix: Option<Prefix>,
document: &Document,
proto: Option<HandleObject>,
can_gc: CanGc,
) -> DomRoot<HTMLAudioElement> {
Node::reflect_node_with_proto(
Box::new(HTMLAudioElement::new_inherited(
@ -49,6 +50,7 @@ impl HTMLAudioElement {
)),
document,
proto,
can_gc,
)
}
}
@ -75,12 +77,12 @@ impl HTMLAudioElementMethods for HTMLAudioElement {
audio
.upcast::<Element>()
.SetAttribute(DOMString::from("preload"), DOMString::from("auto"))
.SetAttribute(DOMString::from("preload"), DOMString::from("auto"), can_gc)
.expect("should be infallible");
if let Some(s) = src {
audio
.upcast::<Element>()
.SetAttribute(DOMString::from("src"), s)
.SetAttribute(DOMString::from("src"), s, can_gc)
.expect("should be infallible");
}