Implement HTMLMetaElement.{name,content} (fixes #5663).

This commit is contained in:
Dhananjay Nakrani 2015-04-14 09:43:22 -07:00 committed by Ms2ger
parent 07aa6306f5
commit 731411660c
9 changed files with 17 additions and 281 deletions

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::HTMLMetaElementBinding;
use dom::bindings::codegen::Bindings::HTMLMetaElementBinding::HTMLMetaElementMethods;
use dom::bindings::codegen::InheritTypes::HTMLMetaElementDerived;
use dom::bindings::js::{JSRef, Temporary};
use dom::document::Document;
@ -11,6 +12,7 @@ use dom::element::ElementTypeId;
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
use dom::node::{Node, NodeTypeId};
use util::str::DOMString;
use string_cache::Atom;
#[dom_struct]
pub struct HTMLMetaElement {
@ -37,3 +39,16 @@ impl HTMLMetaElement {
}
}
impl<'a> HTMLMetaElementMethods for JSRef<'a, HTMLMetaElement> {
// https://html.spec.whatwg.org/multipage/#dom-meta-name
make_getter!(Name, "name");
// https://html.spec.whatwg.org/multipage/#dom-meta-name
make_setter!(SetName, "name");
// https://html.spec.whatwg.org/multipage/#dom-meta-content
make_getter!(Content, "content");
// https://html.spec.whatwg.org/multipage/#dom-meta-content
make_setter!(SetContent, "content");
}

View file

@ -5,9 +5,9 @@
// https://www.whatwg.org/html/#htmlmetaelement
interface HTMLMetaElement : HTMLElement {
// attribute DOMString name;
attribute DOMString name;
// attribute DOMString httpEquiv;
// attribute DOMString content;
attribute DOMString content;
// also has obsolete members
};