Refactor the translatable attribute lightly (#30430)

This commit is contained in:
Ennui Langeweile 2023-09-26 02:05:37 -03:00 committed by GitHub
parent dff6df8912
commit 6f0cba0855
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 13 deletions

View file

@ -516,8 +516,7 @@ impl HTMLElementMethods for HTMLElement {
// https://html.spec.whatwg.org/multipage/#dom-translate
fn SetTranslate(&self, yesno: bool) {
self.upcast::<Element>().set_string_attribute(
// TODO change this to local_name! when html5ever updates
&LocalName::from("translate"),
&html5ever::local_name!("translate"),
match yesno {
true => DOMString::from("yes"),
false => DOMString::from("no"),