Generate bindings for Comment and DocumentType.

This commit is contained in:
Josh Matthews 2013-08-28 20:31:30 -04:00
parent 1eb5eeb630
commit 8070f02e39
12 changed files with 147 additions and 187 deletions

View file

@ -367,12 +367,6 @@ DOMInterfaces = {
'resultNotAddRefed': [ 'getItem' ]
}],
'Text': {
'nativeType': 'AbstractNode<ScriptView>',
'concreteType': 'Text',
'pointerType': ''
},
'UIEvent': {
},
@ -548,12 +542,17 @@ def addExternalIface(iface, nativeType=None, headerFile=None, pointerType=None):
domInterface['pointerType'] = pointerType
DOMInterfaces[iface] = domInterface
def addHTMLElement(element):
def addHTMLElement(element, concrete=None):
DOMInterfaces[element] = {
'nativeType': 'AbstractNode<ScriptView>',
'pointerType': ''
'pointerType': '',
'concreteType': concrete if concrete else element
}
addHTMLElement('Comment')
addHTMLElement('DocumentType', concrete='DocumentType<ScriptView>')
addHTMLElement('Text')
addHTMLElement('HTMLAnchorElement')
addHTMLElement('HTMLAppletElement')
addHTMLElement('HTMLAreaElement')

View file

@ -0,0 +1,15 @@
/* -*- 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://dom.spec.whatwg.org/#comment
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
[Constructor(optional DOMString data = "")]
interface Comment : CharacterData {
};

View file

@ -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://dom.spec.whatwg.org/#documenttype
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
interface DocumentType : Node {
readonly attribute DOMString name;
readonly attribute DOMString publicId;
readonly attribute DOMString systemId;
// Mozilla extension
//readonly attribute DOMString? internalSubset;
};
//DocumentType implements ChildNode;