Implement Element.attributes.

This commit is contained in:
Josh Matthews 2013-11-11 21:35:11 +09:00
parent 6a0201a5a6
commit 249cc6e38f
6 changed files with 102 additions and 7 deletions

View file

@ -0,0 +1,8 @@
/* 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/. */
interface AttrList {
readonly attribute unsigned long length;
getter Attr? item(unsigned long index);
};

View file

@ -72,6 +72,9 @@ DOMInterfaces = {
'AudioBuffer' : {
},
'AttrList': {
},
'mozAudioContext': {
'nativeType': 'AudioContext',
'implicitJSContext': [ 'createBuffer' ],
@ -181,7 +184,7 @@ DOMInterfaces = {
'Element': {
'nativeType': 'AbstractNode<ScriptView>',
'pointerType': '',
'needsAbstract': ['getClientRects', 'getBoundingClientRect', 'setAttribute', 'setAttributeNS', 'id']
'needsAbstract': ['getClientRects', 'getBoundingClientRect', 'setAttribute', 'setAttributeNS', 'id', 'attributes']
},
'Event': {

View file

@ -35,8 +35,8 @@ interface Element : Node {
/*[Constant]
readonly attribute DOMTokenList? classList;*/
/*[Constant]
readonly attribute MozNamedAttrMap attributes;*/
[Constant]
readonly attribute AttrList attributes;
DOMString? getAttribute(DOMString name);
DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
[Throws]