mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
Generate bindings for HTMLTemplateElement.
This commit is contained in:
parent
c532c73964
commit
22e02b573d
8 changed files with 38 additions and 0 deletions
|
@ -606,6 +606,7 @@ addHTMLElement('HTMLTableCellElement')
|
|||
addHTMLElement('HTMLTableColElement')
|
||||
addHTMLElement('HTMLTableRowElement')
|
||||
addHTMLElement('HTMLTableSectionElement')
|
||||
addHTMLElement('HTMLTemplateElement')
|
||||
addHTMLElement('HTMLTextAreaElement')
|
||||
addHTMLElement('HTMLTimeElement')
|
||||
addHTMLElement('HTMLTitleElement')
|
||||
|
|
|
@ -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;
|
||||
*/
|
||||
};
|
||||
|
|
@ -144,6 +144,8 @@ generate_cacheable_wrapper!(HTMLTableRowElement, HTMLTableRowElementBinding::Wra
|
|||
generate_binding_object!(HTMLTableRowElement)
|
||||
generate_cacheable_wrapper!(HTMLTableSectionElement, HTMLTableSectionElementBinding::Wrap)
|
||||
generate_binding_object!(HTMLTableSectionElement)
|
||||
generate_cacheable_wrapper!(HTMLTemplateElement, HTMLTemplateElementBinding::Wrap)
|
||||
generate_binding_object!(HTMLTemplateElement)
|
||||
generate_cacheable_wrapper!(HTMLTextAreaElement, HTMLTextAreaElementBinding::Wrap)
|
||||
generate_binding_object!(HTMLTextAreaElement)
|
||||
generate_cacheable_wrapper!(HTMLTitleElement, HTMLTitleElementBinding::Wrap)
|
||||
|
|
|
@ -75,6 +75,7 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
|
|||
ElementNodeTypeId(HTMLTableColElementTypeId) => generate_element!(HTMLTableColElement),
|
||||
ElementNodeTypeId(HTMLTableRowElementTypeId) => generate_element!(HTMLTableRowElement),
|
||||
ElementNodeTypeId(HTMLTableSectionElementTypeId) => generate_element!(HTMLTableSectionElement),
|
||||
ElementNodeTypeId(HTMLTemplateElementTypeId) => generate_element!(HTMLTemplateElement),
|
||||
ElementNodeTypeId(HTMLTextAreaElementTypeId) => generate_element!(HTMLTextAreaElement),
|
||||
ElementNodeTypeId(HTMLTimeElementTypeId) => generate_element!(HTMLTimeElement),
|
||||
ElementNodeTypeId(HTMLTitleElementTypeId) => generate_element!(HTMLTitleElement),
|
||||
|
|
|
@ -99,6 +99,7 @@ pub enum ElementTypeId {
|
|||
HTMLTableColElementTypeId,
|
||||
HTMLTableRowElementTypeId,
|
||||
HTMLTableSectionElementTypeId,
|
||||
HTMLTemplateElementTypeId,
|
||||
HTMLTextAreaElementTypeId,
|
||||
HTMLTimeElementTypeId,
|
||||
HTMLTitleElementTypeId,
|
||||
|
|
12
src/components/script/dom/htmltemplateelement.rs
Normal file
12
src/components/script/dom/htmltemplateelement.rs
Normal 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 {
|
||||
}
|
|
@ -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, "colgroup",HTMLTableColElementTypeId, HTMLTableColElement, []);
|
||||
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, "time", HTMLTimeElementTypeId, HTMLTimeElement, []);
|
||||
handle_element!(cx, tag, "title", HTMLTitleElementTypeId, HTMLTitleElement, []);
|
||||
|
|
|
@ -110,6 +110,7 @@ pub mod dom {
|
|||
pub mod htmltablecolelement;
|
||||
pub mod htmltablerowelement;
|
||||
pub mod htmltablesectionelement;
|
||||
pub mod htmltemplateelement;
|
||||
pub mod htmltextareaelement;
|
||||
pub mod htmltimeelement;
|
||||
pub mod htmltitleelement;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue