This can be done in two steps: 1. Define the enum in each idl file, but support sharing the underlying C++ enum. This does not currently work due to duplication of generated enum conversion functions. 2. Allow "importing" an idl enum in an other idl file. This would probably require some work, but would minimize the need for mirrored enums that needs to be synced. Example where this could be useful: RTCPeerConnection.idl: [StrictTypeChecking, RaisesException] RTCRtpTransceiver addTransceiver(MediaStreamTrack track, optional RTCRtpTransceiverInit init); [StrictTypeChecking, RaisesException] RTCRtpTransceiver addTransceiver(DOMString kind, optional RTCRtpTransceiverInit init); enum RTCRtpTransceiverDirection { "sendrecv", "sendonly", "recvonly", "inactive" }; dictionary RTCRtpTransceiverInit { RTCRtpTransceiverDirection direction = "sendrecv"; }; RTCRtpTransceiver.idl: readonly attribute RTCRtpTransceiverDirection direction; void setDirection(RTCRtpTransceiverDirection direction); enum RTCRtpTransceiverDirection { "sendrecv", "sendonly", "recvonly", "inactive" };