Skip to content
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

Merged
merged 2 commits into from Mar 23, 2018

Conversation

3 participants
@annevk
Copy link
Member

commented Mar 7, 2018

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 )

Add HTMLOrSVGElement interface mixin
This exposes dataset, tabIndex, focus(), and blur() on SVG elements.

It also does away with NoncedElement.

Tests: ...

Fixes #3471.
@domenic

domenic approved these changes Mar 7, 2018

Copy link
Member

left a comment

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

This comment has been minimized.

Copy link
@domenic

domenic Mar 7, 2018

Member

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>

This comment has been minimized.

Copy link
@domenic

domenic Mar 7, 2018

Member

mixin interface -> interface mixin

@dstorey

This comment has been minimized.

@annevk

This comment has been minimized.

Copy link
Member Author

commented Mar 7, 2018

@mikewest I suspect this might require downstream changes somewhere?

@annevk

This comment has been minimized.

Copy link
Member Author

commented Mar 20, 2018

It does not seem like CSP mentions NoncedElement so I think we're safe from that perspective.

I can update the web-platform-tests IDL. Any progress on tests @dstorey?

annevk added a commit to web-platform-tests/wpt that referenced this pull request Mar 20, 2018

Add HTMLOrSVGElement to HTML's IDL
And align a couple other things while there.

Helps with whatwg/html#3543.
@dstorey

This comment has been minimized.

Copy link
Member

commented Mar 21, 2018

I should be done in the next day or two

nit
@dstorey

This comment has been minimized.

Copy link
Member

commented Mar 23, 2018

@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.

@dstorey

This comment has been minimized.

Copy link
Member

commented Mar 23, 2018

note that dataset already has tests for it in SVG

@annevk

This comment has been minimized.

Copy link
Member Author

commented Mar 23, 2018

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., click() seemed like an obvious addition when I worked on this.

@dstorey

This comment has been minimized.

Copy link
Member

commented Mar 23, 2018

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.

@annevk

This comment has been minimized.

Copy link
Member Author

commented Mar 23, 2018

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.

sideshowbarker added a commit to web-platform-tests/wpt that referenced this pull request Mar 23, 2018

Add HTMLOrSVGElement to HTML's IDL
And align a couple other things while there.

Helps with whatwg/html#3543.

@annevk annevk merged commit 81e8243 into master Mar 23, 2018

2 checks passed

Participation annevk participates on behalf of Mozilla Corporation
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@annevk annevk deleted the annevk/htmlorsvgelement branch Mar 23, 2018

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 15, 2018

Bug 1447313 [wpt PR 10110] - Add HTMLOrSVGElement to HTML's IDL, a=te…
…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

mykmelez pushed a commit to mozilla/gecko that referenced this pull request Apr 16, 2018

Bug 1447313 [wpt PR 10110] - Add HTMLOrSVGElement to HTML's IDL, a=te…
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.