WebIDL used to have a "void" type. It was only allowed as a return type for methods, and essentially mapped to the "undefined" JS value. Anything that needed to use "undefined" (along with other values) as a return value or in the type of an attribute had to use the WebIDL "any" type, which meant that a lot of detail was lost in the type. So a while ago WebIDL was changed to have a real "undefined" type, replacing the "void" type but for example also usable in unions for return values or attribute types.

It took us a while to implement, but I've just landed the patches in https://bugzilla.mozilla.org/show_bug.cgi?id=1659158 that switch Gecko's WebIDL implementation over to the "undefined" type. This makes our WebIDL files more similar to the WebIDL fragments in specs, and allows using the type in all the ways that the WebIDL specification allows. From now on the WebIDL parser will only accept "undefined", and so any in-flight patches that add new WebIDL fragments might need to be adapted to use "undefined" instead of "void".

Peter

--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/39baa085-824b-e382-6f50-dbd5939ebe23%40propagandism.org.

Reply via email to