diff options
author | Ennui Langeweile <85590273+EnnuiL@users.noreply.github.com> | 2023-09-27 09:31:27 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-27 12:31:27 +0000 |
commit | 72313d90df1fd5f8ca639302f11ffaf7060817e1 (patch) | |
tree | 08316122fe7cde158c1d356b5cabf0546e3ab03c /components/script/dom/htmlelement.rs | |
parent | 80d9a2bb4f53090f07b1fd4900ddcf7d49f6fdac (diff) | |
download | servo-72313d90df1fd5f8ca639302f11ffaf7060817e1.tar.gz servo-72313d90df1fd5f8ca639302f11ffaf7060817e1.zip |
Make the `dir` attribute's getter follow the spec (#30435)
* Refactor the `dir` attribute's getter and setter
* Run `./mach fmt`
* disregard all the previous commits
i'm a genius!
Diffstat (limited to 'components/script/dom/htmlelement.rs')
-rw-r--r-- | components/script/dom/htmlelement.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs index c6cf8628896..12a817d8dc4 100644 --- a/components/script/dom/htmlelement.rs +++ b/components/script/dom/htmlelement.rs @@ -124,16 +124,16 @@ impl HTMLElementMethods for HTMLElement { // https://html.spec.whatwg.org/multipage/#attr-lang make_setter!(SetLang, "lang"); + // https://html.spec.whatwg.org/multipage/#the-dir-attribute + make_enumerated_getter!(Dir, "dir", "", "ltr" | "rtl" | "auto"); + // https://html.spec.whatwg.org/multipage/#the-dir-attribute + make_setter!(SetDir, "dir"); + // https://html.spec.whatwg.org/multipage/#dom-hidden make_bool_getter!(Hidden, "hidden"); // https://html.spec.whatwg.org/multipage/#dom-hidden make_bool_setter!(SetHidden, "hidden"); - // https://html.spec.whatwg.org/multipage/#the-dir-attribute - make_getter!(Dir, "dir"); - // https://html.spec.whatwg.org/multipage/#the-dir-attribute - make_setter!(SetDir, "dir"); - // https://html.spec.whatwg.org/multipage/#globaleventhandlers global_event_handlers!(NoOnload); |