Add undefined as a type to WebIDL

In <http://lists.w3.org/Archives/Public/www-style/2012Jul/0574.html>,
I proposed a new event to add to CSSOM to track the loading of fonts
specified in @font-face. The event's interface contains attributes
corresponding to the descriptors in the corresponding @font-face, so
you can identify which font was loaded.  I'd like to specify that
missing descriptors have the value undefined, but that's not currently
possible in WebIDL (I can only say that they're optional, which makes
them the value null instead).

Could we have undefined added as a type with a single value to WebIDL,
so we can then use it in unions for things like this?

(Note that you can, currently, use undefined as-is if you specify the
type as "any".  You just can't do it for anything else.)

~TJ

Received on Tuesday, 24 July 2012 21:13:50 UTC