mirror of
https://github.com/servo/servo.git
synced 2025-10-18 17:29:18 +01:00
Generate HTMLHtmlElement bindings.
This commit is contained in:
parent
9a545b13c3
commit
e2468160b5
6 changed files with 79 additions and 28 deletions
|
@ -229,16 +229,6 @@ DOMInterfaces = {
|
|||
'pointerType': '',
|
||||
},
|
||||
|
||||
'HTMLElement': {
|
||||
'nativeType': 'AbstractNode<ScriptView>',
|
||||
'pointerType': ''
|
||||
},
|
||||
|
||||
'HTMLHeadElement': {
|
||||
'nativeType': 'AbstractNode<ScriptView>',
|
||||
'pointerType': ''
|
||||
},
|
||||
|
||||
'HTMLOptionsCollection': [
|
||||
{
|
||||
'nativeType': 'nsHTMLOptionCollection',
|
||||
|
@ -548,6 +538,16 @@ def addExternalIface(iface, nativeType=None, headerFile=None, pointerType=None):
|
|||
domInterface['pointerType'] = pointerType
|
||||
DOMInterfaces[iface] = domInterface
|
||||
|
||||
def addHTMLElement(element):
|
||||
DOMInterfaces[element] = {
|
||||
'nativeType': 'AbstractNode<ScriptView>',
|
||||
'pointerType': ''
|
||||
}
|
||||
|
||||
addHTMLElement('HTMLElement')
|
||||
addHTMLElement('HTMLHeadElement')
|
||||
addHTMLElement('HTMLHtmlElement')
|
||||
|
||||
# If you add one of these, you need to make sure nsDOMQS.h has the relevant
|
||||
# macros added for it
|
||||
def addExternalHTMLElement(element):
|
||||
|
|
|
@ -4605,7 +4605,7 @@ class CGBindingRoot(CGThing):
|
|||
'dom::characterdata::CharacterData', #XXXjdm
|
||||
'dom::node::{AbstractNode, Node, Text}', #XXXjdm
|
||||
'dom::document::{Document, AbstractDocument}', #XXXjdm
|
||||
'dom::element::{Element, HTMLHeadElement}', #XXXjdm
|
||||
'dom::element::{Element, HTMLHeadElement, HTMLHtmlElement}', #XXXjdm
|
||||
'dom::htmlelement::HTMLElement', #XXXjdm
|
||||
'dom::htmldocument::HTMLDocument', #XXXjdm
|
||||
'dom::bindings::utils::*',
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||
*
|
||||
* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
|
||||
* Opera Software ASA. You are granted a license to use, reproduce
|
||||
* and create derivative works of this document.
|
||||
*/
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
|
||||
interface HTMLHtmlElement : HTMLElement {};
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||
partial interface HTMLHtmlElement {
|
||||
[SetterThrows, Pure]
|
||||
attribute DOMString version;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue