W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2015

[enhancement request] enum partials

From: Tobie Langel <tobie@sensors.codespeaks.com>
Date: Wed, 10 Jun 2015 11:38:05 +0200
Message-Id: <1433929085.4002818.291670049.178FD795@webmail.messagingengine.com>
To: public-script-coord@w3.org
Cc: Mounir Lamouri <mounir@lamouri.fr>, Marcos Caceres <marcos@marcosc.com>

The Permission API spec[1] is defining PermissionName enum[2] which acts
as a registry of Permission names.

I've recently started working on the Generic Sensor API[3] which aims to
provide a blueprint and abstract classes for concrete sensor specs (e.g.
proximity sensors, geolocation, etc.) to build on. It would be great if
such specs could directly add their names to the PermissionName registry
instead of having to modify another spec for this (I'm tracking this
here [4]).

Adding support for partial enums in WebIDL would do the trick. For
example, it would allow the proximity sensor spec to specify
registration like so:

partial enum PermissionName {

Is that doable? Else what other option would allow for this use case?

Thanks for your time,


[1]: https://w3c.github.io/permissions/
[2]: https://w3c.github.io/permissions/#idl-def-PermissionName
[3]: http://w3c.github.io/sensors/
[4]: https://github.com/w3c/sensors/issues/22
Received on Wednesday, 10 June 2015 09:38:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:24 UTC