W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2012

Add undefined as a type to WebIDL

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 24 Jul 2012 14:13:03 -0700
Message-ID: <CAAWBYDA7b_coWNbCZ3uGhHxe-dHN8skyB-jVx48VFmU-sRCv1w@mail.gmail.com>
To: public-script-coord@w3.org
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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC