Generate bindings for HTMLTemplateElement.

This commit is contained in:
Tetsuharu OHZEKI 2013-08-24 01:48:11 +09:00
parent c532c73964
commit 22e02b573d
8 changed files with 38 additions and 0 deletions

View file

@ -606,6 +606,7 @@ addHTMLElement('HTMLTableCellElement')
addHTMLElement('HTMLTableColElement') addHTMLElement('HTMLTableColElement')
addHTMLElement('HTMLTableRowElement') addHTMLElement('HTMLTableRowElement')
addHTMLElement('HTMLTableSectionElement') addHTMLElement('HTMLTableSectionElement')
addHTMLElement('HTMLTemplateElement')
addHTMLElement('HTMLTextAreaElement') addHTMLElement('HTMLTextAreaElement')
addHTMLElement('HTMLTimeElement') addHTMLElement('HTMLTimeElement')
addHTMLElement('HTMLTitleElement') addHTMLElement('HTMLTitleElement')

View file

@ -0,0 +1,19 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
// import from http://mxr.mozilla.org/mozilla-central/source/dom/webidl/HTMLTemplateElement.webidl
interface HTMLTemplateElement : HTMLElement {
/* FIXME:
readonly attribute DocumentFragment content;
*/
};

View file

@ -144,6 +144,8 @@ generate_cacheable_wrapper!(HTMLTableRowElement, HTMLTableRowElementBinding::Wra
generate_binding_object!(HTMLTableRowElement) generate_binding_object!(HTMLTableRowElement)
generate_cacheable_wrapper!(HTMLTableSectionElement, HTMLTableSectionElementBinding::Wrap) generate_cacheable_wrapper!(HTMLTableSectionElement, HTMLTableSectionElementBinding::Wrap)
generate_binding_object!(HTMLTableSectionElement) generate_binding_object!(HTMLTableSectionElement)
generate_cacheable_wrapper!(HTMLTemplateElement, HTMLTemplateElementBinding::Wrap)
generate_binding_object!(HTMLTemplateElement)
generate_cacheable_wrapper!(HTMLTextAreaElement, HTMLTextAreaElementBinding::Wrap) generate_cacheable_wrapper!(HTMLTextAreaElement, HTMLTextAreaElementBinding::Wrap)
generate_binding_object!(HTMLTextAreaElement) generate_binding_object!(HTMLTextAreaElement)
generate_cacheable_wrapper!(HTMLTitleElement, HTMLTitleElementBinding::Wrap) generate_cacheable_wrapper!(HTMLTitleElement, HTMLTitleElementBinding::Wrap)

View file

@ -75,6 +75,7 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
ElementNodeTypeId(HTMLTableColElementTypeId) => generate_element!(HTMLTableColElement), ElementNodeTypeId(HTMLTableColElementTypeId) => generate_element!(HTMLTableColElement),
ElementNodeTypeId(HTMLTableRowElementTypeId) => generate_element!(HTMLTableRowElement), ElementNodeTypeId(HTMLTableRowElementTypeId) => generate_element!(HTMLTableRowElement),
ElementNodeTypeId(HTMLTableSectionElementTypeId) => generate_element!(HTMLTableSectionElement), ElementNodeTypeId(HTMLTableSectionElementTypeId) => generate_element!(HTMLTableSectionElement),
ElementNodeTypeId(HTMLTemplateElementTypeId) => generate_element!(HTMLTemplateElement),
ElementNodeTypeId(HTMLTextAreaElementTypeId) => generate_element!(HTMLTextAreaElement), ElementNodeTypeId(HTMLTextAreaElementTypeId) => generate_element!(HTMLTextAreaElement),
ElementNodeTypeId(HTMLTimeElementTypeId) => generate_element!(HTMLTimeElement), ElementNodeTypeId(HTMLTimeElementTypeId) => generate_element!(HTMLTimeElement),
ElementNodeTypeId(HTMLTitleElementTypeId) => generate_element!(HTMLTitleElement), ElementNodeTypeId(HTMLTitleElementTypeId) => generate_element!(HTMLTitleElement),

View file

@ -99,6 +99,7 @@ pub enum ElementTypeId {
HTMLTableColElementTypeId, HTMLTableColElementTypeId,
HTMLTableRowElementTypeId, HTMLTableRowElementTypeId,
HTMLTableSectionElementTypeId, HTMLTableSectionElementTypeId,
HTMLTemplateElementTypeId,
HTMLTextAreaElementTypeId, HTMLTextAreaElementTypeId,
HTMLTimeElementTypeId, HTMLTimeElementTypeId,
HTMLTitleElementTypeId, HTMLTitleElementTypeId,

View file

@ -0,0 +1,12 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::htmlelement::HTMLElement;
pub struct HTMLTemplateElement {
parent: HTMLElement,
}
impl HTMLTemplateElement {
}

View file

@ -234,6 +234,7 @@ fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView>
handle_element!(cx, tag, "col", HTMLTableColElementTypeId, HTMLTableColElement, []); handle_element!(cx, tag, "col", HTMLTableColElementTypeId, HTMLTableColElement, []);
handle_element!(cx, tag, "colgroup",HTMLTableColElementTypeId, HTMLTableColElement, []); handle_element!(cx, tag, "colgroup",HTMLTableColElementTypeId, HTMLTableColElement, []);
handle_element!(cx, tag, "tbody", HTMLTableSectionElementTypeId, HTMLTableSectionElement, []); handle_element!(cx, tag, "tbody", HTMLTableSectionElementTypeId, HTMLTableSectionElement, []);
handle_element!(cx, tag, "template",HTMLTemplateElementTypeId, HTMLTemplateElement, []);
handle_element!(cx, tag, "textarea",HTMLTextAreaElementTypeId, HTMLTextAreaElement, []); handle_element!(cx, tag, "textarea",HTMLTextAreaElementTypeId, HTMLTextAreaElement, []);
handle_element!(cx, tag, "time", HTMLTimeElementTypeId, HTMLTimeElement, []); handle_element!(cx, tag, "time", HTMLTimeElementTypeId, HTMLTimeElement, []);
handle_element!(cx, tag, "title", HTMLTitleElementTypeId, HTMLTitleElement, []); handle_element!(cx, tag, "title", HTMLTitleElementTypeId, HTMLTitleElement, []);

View file

@ -110,6 +110,7 @@ pub mod dom {
pub mod htmltablecolelement; pub mod htmltablecolelement;
pub mod htmltablerowelement; pub mod htmltablerowelement;
pub mod htmltablesectionelement; pub mod htmltablesectionelement;
pub mod htmltemplateelement;
pub mod htmltextareaelement; pub mod htmltextareaelement;
pub mod htmltimeelement; pub mod htmltimeelement;
pub mod htmltitleelement; pub mod htmltitleelement;