Open marcoscaceres opened 6 months ago
Are there any canonical examples (e.g. in the WebIDL or Infra specs) for the correct incantation for initializing a new instance of an interface? I feel like I've seen a number of different styles over the years. Your comment that "the event needs to be initialized with DeviceOrientationEventInit
instead" implies that the steps should be something like:
- Let eventInit be «[ "alpha" → z, "beta" → x, "gamma" → y, "absolute" → absolute ]».
- Let event be a new DeviceOrientationEvent using eventInit.
- Fire an event named event at window, using event.
In "fire an orientation event", it reads:
However, the event needs to be initialized with
DeviceOrientationEventInit
instead.