mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Implement HTMLMetaElement.{name,content} (fixes #5663).
This commit is contained in:
parent
07aa6306f5
commit
731411660c
9 changed files with 17 additions and 281 deletions
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue