-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add HTMLOrSVGElement interface mixin #3543
Conversation
This exposes dataset, tabIndex, focus(), and blur() on SVG elements. It also does away with NoncedElement. Tests: ... Fixes #3471.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first glance the processing model appears to work fine for each of these.
What's the implementer interest status on all of these? Edge yes, anyone else? (Maybe for a subset?)
source
Outdated
data-dfn-type="attribute">[[CryptographicNonce]]</dfn>, and exposing it to script via the | ||
<code>NoncedElement</code> interface defined below. Unless otherwise specified, the slot's value | ||
<code>HTMLOrSVGElement</code> mixin interface. Unless otherwise specified, the slot's value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixin interface -> interface mixin
source
Outdated
@@ -10195,6 +10186,21 @@ interface <dfn>HTMLUnknownElement</dfn> : <span>HTMLElement</span> { };</pre> | |||
|
|||
</div> | |||
|
|||
<p>Features shared between HTML and SVG elements use the <code>HTMLOrSVGElement</code> mixin | |||
interface: <ref spec=SVG></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixin interface -> interface mixin
@domenic All major browsers support tabindex/focus/blur/dataset on SVGElement https://developer.microsoft.com/en-us/microsoft-edge/platform/catalog/?page=1&q=svgel%20spec%3Adetected%20edge%3Adetected%20chrome%3Adetected%20firefox%3Adetected%20safari%3Adetected |
@mikewest I suspect this might require downstream changes somewhere? |
It does not seem like CSP mentions I can update the web-platform-tests IDL. Any progress on tests @dstorey? |
And align a couple other things while there. Helps with whatwg/html#3543.
I should be done in the next day or two |
@annevk I made my first attempt at tests at web-platform-tests/wpt#10149 I converted existing HTML tests to use the SVG file that SVG tests suppose to use, and adapted the focus flag test to use those defined in the scripting section of SVG. |
note that dataset already has tests for it in SVG |
Thanks, I think that's good enough to go ahead and merge this. I had one more question, should we consider doing this for more features? E.g., |
Perhaps. It will probably be easy to implement in Edge too. Might be something we want to discuss on the SVG call on Monday. We're already discussing changing SVGAElement members (outside of href and probably target) to the HTML definition; and if we do that those would probably make sense to move to HTMLorSVGAnchorElement or the existing mixin. |
Okay, please open new issues for those if there's some agreement. In general I'm hugely in favor of increasing the number of code paths that are shared with SVG. |
And align a couple other things while there. Helps with whatwg/html#3543.
…stonly Automatic update from web-platform-testsAdd HTMLOrSVGElement to HTML's IDL And align a couple other things while there. Helps with whatwg/html#3543. wpt-commits: 20d739eff6ebfe360c1aadfd3f3161c0fce847a2 wpt-pr: 10110 wpt-commits: 20d739eff6ebfe360c1aadfd3f3161c0fce847a2 wpt-pr: 10110
…stonly Automatic update from web-platform-testsAdd HTMLOrSVGElement to HTML's IDL And align a couple other things while there. Helps with whatwg/html#3543. wpt-commits: 20d739eff6ebfe360c1aadfd3f3161c0fce847a2 wpt-pr: 10110 wpt-commits: 20d739eff6ebfe360c1aadfd3f3161c0fce847a2 wpt-pr: 10110 UltraBlame original commit: f9c70032691f8b6bc9cc1af98df0f5c4e84cd319
…stonly Automatic update from web-platform-testsAdd HTMLOrSVGElement to HTML's IDL And align a couple other things while there. Helps with whatwg/html#3543. wpt-commits: 20d739eff6ebfe360c1aadfd3f3161c0fce847a2 wpt-pr: 10110 wpt-commits: 20d739eff6ebfe360c1aadfd3f3161c0fce847a2 wpt-pr: 10110 UltraBlame original commit: f9c70032691f8b6bc9cc1af98df0f5c4e84cd319
…stonly Automatic update from web-platform-testsAdd HTMLOrSVGElement to HTML's IDL And align a couple other things while there. Helps with whatwg/html#3543. wpt-commits: 20d739eff6ebfe360c1aadfd3f3161c0fce847a2 wpt-pr: 10110 wpt-commits: 20d739eff6ebfe360c1aadfd3f3161c0fce847a2 wpt-pr: 10110 UltraBlame original commit: f9c70032691f8b6bc9cc1af98df0f5c4e84cd319
This exposes dataset, tabIndex, focus(), and blur() on SVG elements.
It also does away with NoncedElement.
Tests: ...
Fixes #3471.
/dom.html ( diff )
/infrastructure.html ( diff )
/urls-and-fetching.html ( diff )