-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guarantee that there are events associated with interfaces that inherit from EventTarget
#1216
Comments
I've been looking into adding a check to Strudy's
I'll try to prepare something relatively clean for integration in Strudy. In the meantime, the analysis reveals that we could almost guarantee that "all event handlers get targeted by a suitable event", but for the following cases:
[Edit: problems reported and fixed] This also reveals 4 other problems in WebXR Layers, where the
While digging into data, I also bumped into the definition of XHR events, which are currently defined with a |
The `redraw` event was defined with a `for="XRLayer"` attribute. That is not really correct, because the even can only fire at some of the `XRCompositionLayer` interfaces. This update adjusts the `for` attribute accordingly, making the definition consistent with the IDL definitions of the related `EventHandler` attributes. (Via w3c/webref#1216)
As discovered in w3c/webref#1216 (comment)
When an interface defines an event handler, there should always be an event named after the event handler that targets the interface. The new `noEvent` anomaly detects situations where the event is missing. The analysis reports the two anomalies mentioned in: w3c/webref#1216 (comment)
When an interface defines an event handler, there should always be an event named after the event handler that targets the interface. The new `noEvent` anomaly detects situations where the event is missing. The analysis reports the two anomalies mentioned in: w3c/webref#1216 (comment) (The analysis reports additional anomalies when run on the raw extracts. That's normal and due to missing event targets that get added during curation)
When an interface defines an event handler, there should always be an event named after the event handler that targets the interface. The new `noEvent` anomaly detects situations where the event is missing. The analysis reports the two anomalies mentioned in: w3c/webref#1216 (comment) (The analysis reports additional anomalies when run on the raw extracts. That's normal and due to missing event targets that get added during curation)
Via #1212 (comment).
We already use the fact that an interface inherits from
EventTarget
to find target interfaces for events when we extract them from the specs, but we don't have test in place that checks that:EventTarget
are targeted by at least one event (for example: there should be events that targetCloseWatcher
)EventHandler
attributes in such interfaces (for example: there should acancel
event that targetsCloseWatcher
because it has anoncancel
attribute.Depending on what research reveals, this test could be turned into a guarantee for the
@webref/events
package. There may be exceptions to the rule though (such as new interfaces for which the draft spec does not yet correctly define associated events)The text was updated successfully, but these errors were encountered: