mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Generate bindings for Comment and DocumentType.
This commit is contained in:
parent
1eb5eeb630
commit
8070f02e39
12 changed files with 147 additions and 187 deletions
|
@ -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')
|
||||
|
|
15
src/components/script/dom/bindings/codegen/Comment.webidl
Normal file
15
src/components/script/dom/bindings/codegen/Comment.webidl
Normal 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 {
|
||||
};
|
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue