Auto merge of #13028 - ofekd:implement-data-value-attr, r=KiChjang

Implement HTMLDataElement#value

<!-- Please describe your changes on the following line: -->
Implement HTMLDataElement#value

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12966

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13028)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-25 12:48:06 -05:00 committed by GitHub
commit 6beec195ed
6 changed files with 82 additions and 136 deletions

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::HTMLDataElementBinding;
use dom::bindings::codegen::Bindings::HTMLDataElementBinding::HTMLDataElementMethods;
use dom::bindings::js::Root;
use dom::bindings::str::DOMString;
use dom::document::Document;
@ -33,3 +34,11 @@ impl HTMLDataElement {
HTMLDataElementBinding::Wrap)
}
}
impl HTMLDataElementMethods for HTMLDataElement {
// https://html.spec.whatwg.org/multipage/#dom-data-value
make_getter!(Value, "value");
// https://html.spec.whatwg.org/multipage/#dom-data-value
make_setter!(SetValue, "value");
}

View file

@ -4,5 +4,5 @@
// https://html.spec.whatwg.org/multipage/#htmldataelement
interface HTMLDataElement : HTMLElement {
// attribute DOMString value;
attribute DOMString value;
};