-
Notifications
You must be signed in to change notification settings - Fork 132
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
window event attribute category is not referenced #741
Comments
@heycam So the attributes in question are not only no referenced but lack a description as well? Do we have any implementation reports? |
That's right. They're all attributes that are defined in HTML anyway. |
@heycam Ah ok, I am fine with removing the tables. Are they part of the mixins we share with HTML and SVG? |
Ah, yes the IDL attributes are all defined on |
@dirkschulze actually, hold on a moment. Is the intention that these attributes are all supported on a root (If so, then the right fix is not to remove the attribute category, but to add "window event" attribute category, to the |
In https://svgwg.org/svg2-draft/interact.html#EventAttributes it says
That sounds like every event type gets an event handler content attribute, and they can all be specified on every SVG element. "pagehide" is a supported event in all browsers, but I don't think that |
With respect to the section quoted in #741 (comment), we already have an open issue for fixing that language (#467). But the window event handlers are separate. HTML exposes them on body/frameset (including as markup attributes) as well as the window DOM object. SVG 1.1 defined a list of "document-level event attributes" that can only be specified on Quick testing today, neither Chrome nor Firefox seem to support So maybe we can just match reality and drop any attribute version of these handlers? That means you couldn't set them from markup in a standalone scripted SVG file, but do you really need to? I don't think anyone's ever complained about them missing… |
The SVG Working Group just discussed The full IRC log of that discussion<AmeliaBR> Topic: window event attribute category is not referenced<AmeliaBR> github: https://github.com//issues/741 <AmeliaBR> Amelia: This is in respect to window event handlers. In HTML, you can set these with attributes on the body & they're reflected up. In the SVG definitions.xml, we've got a defined class of these attributes but don't actually use it anywhere. <AmeliaBR> ... There's also confusions because a lot of these events have changed since SVG 1. <AmeliaBR> ... As far as I could tell, no one supports the attributes, but I haven't tested all the details. <AmeliaBR> krit: So we need more tests? <AmeliaBR> Amelia: Yes. Though maybe not ready for formal WPT tests yet. Need to figure out what the spec should be based on what works. <AmeliaBR> ... My preference is to match implementations & match HTML as much as those intersect. Not a strong argument for `onunload` and `onload` attributes and such. <AmeliaBR> ... Next actions? Should we try to ping more implementers? <AmeliaBR> krit: That sounds like a good idea. I won't have time to look at it. |
In definitions.xml, there is an attribute category named "window event" that includes event attributes like onafterprint, onpagehide, etc. This attribute category isn't referenced anywhere, and neither are the attributes listed in it. The attributes in this category end up in the attribute table appendix, but with no elements listed next to them. (Which makes sense, since they're used on the window object.)
Should it be removed?
The text was updated successfully, but these errors were encountered: