-
Notifications
You must be signed in to change notification settings - Fork 144
Refactor progress, composition, focus events #1101
Comments
@chrisdavidmills I am as usual confused about the proper targets for the progress events. I'm pretty sure XMLHttpRequest is one target, so I've migrated them under there: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#Events It seems as though they are also on FileReader (see https://searchfox.org/mozilla-central/search?q=ProgressEvent&path=). The docs pages themselves suggest they are also on image and video elements, but although I can get events on those elements with names like loadstart, load, progress, they don't seem to be actual |
@wbamberg you sure do pick the fun ones ;-) So, the FIle API definitely uses proper As for images and video, is it not just that they inherit from HTMLElement: https://html.spec.whatwg.org/multipage/dom.html#htmlelement Which implements the GlobalEventHandlers mixin: https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers ? |
Oh thank you, that does make sense (I think). Except that these are just But also! Your link points to https://html.spec.whatwg.org/multipage/media.html#event-media-progress, which seems to be telling me that these events are fired only on media elements (https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement, presumably) - and AFAIK this does not include image elements, so the existing docs are wrong there, too? So it seems like what we should do here is: write pages for the relevant events under https://html.spec.whatwg.org/multipage/media.html#event-media-progress (specifically, I guess, |
I've added:
|
Good approach Will — I think this works well, and I really like the live examples. I've looked through the pages and they generally seem pretty decent. the FileReader events section is missing the opening paragraph about using addEventListener, and I wonder whether the live examples need a note to say that you could also use |
@chrisdavidmills , I reckon these pages are ready for a look. progress eventsThis is as noted in #1101 (comment). I added the paragraph in FileReader#Events as you asked, but didn't add a note to the live samples - I could, but it seemed like hammering the point. focus events
As far as I can tell Window is not a target for composition eventsInterestingly these do not seem to have a corresponding |
Hi @wbamberg ! Some feedback for you (these largely look really good): FileReader events
Element focus events
Window focus events
Composition events
|
Thanks Chris.
I'm not proposing to add these pages where they don't exist as I feel it's out of scope for refactoring the existing event ref pages. I can if you like though, but of course it will make everything take longer.
Yup, as above.
Yes.
Yes, basically this (especially "Composed" - although we ought to explain somewhere that that means, since it is very non-obvious to me) seemed useful, and I don't think it's a good idea removing potentially useful entries without having thought about what this box should contain. I don't really want to go back adding these rows to all the other tables at this stage. In general I think it's not realistic or a sensible use of our time to expect this degree of consistency out of the Wiki. If we want to keep these boxes, and we want a high degree of consistency, then in the medium term one approach could be to keep the data in mdn/data and build it using a macro. Long term we should fold it into an overall structured content plan.
Oops. Removed.
We could ask. I don't have contacts there though. I don't think we should block this work for that.
Thanks, I've tried improving the instructions. I didn't say "some other printable key" since I think giving very specific instructions is likely to be more helpful. |
Nah, that's fine. As we agreed in that other thread with @a2sheppy , we are gonna leave creating new pages for now, to make the scope of work more manageable.
That's perfectly fine, and makes sense.
I'm in favour of leaving this for now, as we have enough to do already. This could be part of a future maintenance run.
This is much better. I just increased the height of the live examples to avoid a vertical scrollbar on Firefox; I'm happy with this now. So I think one looks done. Happy to close if you are. Oh, wait, do we have BCD in place for these? |
I have a PR for it: mdn/browser-compat-data#3585. It would I guess be great to get it reviewed before tomorrow's push. If you don't have time I could ask someone else though. |
I forgot to update BCD for focus events. I have just filed mdn/browser-compat-data#3650 for that. |
BCD is updated and deployed, pages are refreshed. Closing. |
This is a work item for #685.
progress:
focus:
composition
AC:
The text was updated successfully, but these errors were encountered: