mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Making getters and setters
This commit is contained in:
parent
16bdf9225d
commit
5f77b60c3a
2 changed files with 45 additions and 4 deletions
|
@ -3,9 +3,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::Bindings::HTMLSourceElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLSourceElementBinding::HTMLSourceElementMethods;
|
||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::root::DomRoot;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::htmlmediaelement::HTMLMediaElement;
|
||||
|
@ -53,3 +55,36 @@ impl VirtualMethods for HTMLSourceElement {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl HTMLSourceElementMethods for HTMLSourceElement {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-source-src
|
||||
make_getter!(Src, "src");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-source-src
|
||||
make_setter!(SetSrc, "src");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-source-type
|
||||
make_getter!(Type, "type");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-source-type
|
||||
make_setter!(SetType, "type");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-source-srcset
|
||||
make_getter!(Srcset, "srcset");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-source-srcset
|
||||
make_setter!(SetSrcset, "srcset");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-source-sizes
|
||||
make_getter!(Sizes, "sizes");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-source-sizes
|
||||
make_setter!(SetSizes, "sizes");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-source-media
|
||||
make_getter!(Media, "media");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-source-media
|
||||
make_setter!(SetMedia, "media");
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue