diff options
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/htmldataelement.rs | 9 | ||||
-rw-r--r-- | components/script/dom/webidls/HTMLDataElement.webidl | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/components/script/dom/htmldataelement.rs b/components/script/dom/htmldataelement.rs index f412fd57570..c4bd0bfd173 100644 --- a/components/script/dom/htmldataelement.rs +++ b/components/script/dom/htmldataelement.rs @@ -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"); +} diff --git a/components/script/dom/webidls/HTMLDataElement.webidl b/components/script/dom/webidls/HTMLDataElement.webidl index be932250678..658f5274491 100644 --- a/components/script/dom/webidls/HTMLDataElement.webidl +++ b/components/script/dom/webidls/HTMLDataElement.webidl @@ -4,5 +4,5 @@ // https://html.spec.whatwg.org/multipage/#htmldataelement interface HTMLDataElement : HTMLElement { - // attribute DOMString value; + attribute DOMString value; }; |