- From: Axel Nennker <notifications@github.com>
- Date: Mon, 07 Nov 2016 06:28:51 -0800
- To: heycam/webidl <webidl@noreply.github.com>
Received on Monday, 7 November 2016 14:29:22 UTC
Currently enum are in the global namespace.
Enums should be local able to be specified local to interfaces.
This example https://heycam.github.io/webidl/#example-363ff014 would then look like this
interface Meal {
enum MealType { "rice", "noodles", "other" };
attribute MealType type;
attribute double size; // in grams
void initialize(MealType type, double size);
};
and the usage would look like
var ravioli = new Meal();
ravioli.initialize(Meal.MealType.noodles, 200);
window.MealType is undefined
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/227
Received on Monday, 7 November 2016 14:29:22 UTC