This fake spec tried to exercise all aspects of WebIDL so as to do regression testing in this complex piece of code.

CUSTOM PARAGRAPH

Unsupported

The following aspects of WebIDL are not currently supported and are not yet tested for:

Support for these features will likely be added later.

The following features are supposedly supported but actually buggy:

Things that still need to be done:

Interfaces

Basic interface.

Interface with extended attribute.

Interface with inheritance.

Partial interface .

Callback interface .

Constructors

Constructors on interfaces

Constructor()
Constructor without parameters.
Constructor(boolean bar, sequence<double> foo, Promise<double> blah)
Constructor with parameters.
Constructor()

NamedConstructors

NamedConstructors on interfaces

NamedConstructor=Sun()
NamedConstructor without parameters.
NamedConstructor=Sun(boolean bar, Date[][][] foo)
NamedConstructor with parameters.

Constants

All constants and some type testing

const boolean test = true
1
const byte bite = 8
2
const octet eight = 7
3
const short small = 42
4
const unsigned short shortish = 250
5
const long notSoLong = 99999
6
const unsigned long somewhatLong = 9999999
7
const long long veryLong = 9999999999999
8
const unsigned long long soLong = 99999999999999999
9
const float ationDevice = 4.2
10
const unrestricted float buoy = 4.2222222222
11
const double twice = 4.222222222
12
const unrestricted double rambaldi = 47.0
13
const boolean? why = false
14
const boolean? notSo = null
15
const short inf = Infinity
16
const short mininf = -Infinity
17
const short cheese = NaN
18
[Something] const short extAttr = NaN
18

Attributes

Basic attributes testing.

attribute DOMString regular
1
readonly attribute DOMString ro
2
readonly attribute DOMString _readonly
2.2
inherit attribute DOMString in
2.5
stringifier attribute DOMString st
2.7
[Something] readonly attribute DOMString ext
3
attribute sequence<Date> dates
3.5
attribute Promise<DOMString> operation
4.0
attribute sequence<Promise<Superstar>> wouldBeStars
4.5
static readonly attribute FrozenArray<RTCIceServer> xdefaultIceServers
4.6

Operations

Basic operations testing.

void basic()
1
[Something] void ext()
2
unsigned long long ull()
3
SuperStar? ull()
3.5
SuperStar[][][][] paramed()
4
SuperStar[][][] one
4.1
[ExtAttrs] ByteString? ext
4.1
optional short maybe
4.2
short[] shorts
4.3
short[][][][] hypercubes
4.3
optional short defaulted = 3.5
4.3
DOMString defaulted2 = "one"
4.3
short... variable
4.last

Serializer

attribute DOMString foo
attribute DOMString bar
serializer = { foo, bar }

Comments

// This is a comment
// over two lines.

Dictionaries

Basic dictionary.

Inheriting dictionary.

Data in dictionary.

DOMString value
1
DOMString? nullable
2
[Something]float ext
3
unsigned long long longLong
4
boolean test = true
5
byte little = 2
7
byte big = Infinity
8
byte cheese = NaN
9
required sequence<DOMString> names
10
DOMString blah = "blah blah"
11

Exceptions

Basic exception.

Inheriting exception.

Exception with content.

[Something]const SuperStar value = 42
1
SuperStar? message
2
sequence<SuperStar> floats
3
SuperStar[][] numbers
4
Promise<SuperStar> stars
5

Enumerations

Basic enumeration.

one
1
two
2
three
3
white space
4

Callbacks

Basic callback.

Less basic callback.

optional any value
1

Typedefs

Basic typedef.

Less basic typedef.

Implements

Basic implements.

Less basic implements.

maplike

void foo()
foo description
maplike<DOMString,SuperStar>
This is a maplike interface whose value is a SuperStar instance and key is its ID.
attribute DOMString bar
bar description

readonly maplike

void foo()
foo description
readonly maplike<DOMString,SuperStar>
This is a readonly maplike interface whose value is a SuperStar instance and key is its ID.
attribute DOMString bar
bar description

iterable

iterable<DOMString>
The values to iterate over are a snapshot of the names of the mome raths, in lexical order.
attribute DOMString foo
attribute DOMString bar

iterable-pairs

iterable<DOMString,SuperStar>
The key value pairs to iterate over are a snapshot of the names and mimsy states of the mome raths, in lexical order of name.
attribute DOMString foo
attribute DOMString bar