Commit c4c2cb8
committed
Patch
As discussed in #1212, the `cancel` event bubbles on `HTMLInputElement`,
but it does not bubble on `HTMLDialogElement`. It does not bubble on
`CloseWatcher` either but that's because `CloseWatcher` is not part of a
bubbling tree in any case.
Events extraction cannot automatically get this nuance, be it only because it
only sees `HTMLElement` as target interface for the event, and not
`HTMLInputElement` and `HTMLDialogElement`. In practice, it claims that the
event bubbles, which is neither wrong nor right.
This patch restricts the `cancel` entry in the HTML events extract to only
target `HTMLInputElement`, in order to create the right bubbling entry. And
it creates another `cancel` entry which does not bubble for `HTMLDialogElement`
and `CloseWatcher`.
With this patch (and the new version of Reffy), we should end up with the
following entry in the consolidated `events.json` file, which captures the
fact that:
- the event bubbles on `HTMLInputElement`
- the event does not bubble on `HTMLDialogElement`
- the concept of bubbling is meaningless on `CloseWatcher`
```json
{
"href": "https://html.spec.whatwg.org/multipage/indices.html#event-cancel",
"src": {
"format": "summary table",
"href": "https://html.spec.whatwg.org/multipage/indices.html#event-cancel"
},
"type": "cancel",
"targets": [
{
"target": "HTMLInputElement",
"bubbles": true,
"bubblingPath": [
"Node",
"Document",
"Window"
]
},
{
"target": "CloseWatcher"
},
{
"target": "HTMLDialogElement",
"bubbles": false
}
],
"interface": "Event"
}
```cancel event to refine bubbling information1 parent cce9b99 commit c4c2cb8
1 file changed
+25
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
186 | 194 | | |
187 | 195 | | |
188 | 196 | | |
189 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
190 | 211 | | |
191 | 212 | | |
192 | 213 | | |
193 | 214 | | |
194 | | - | |
| 215 | + | |
195 | 216 | | |
196 | 217 | | |
197 | 218 | | |
| |||
0 commit comments