8000
Skip to content

Add HTMLOrSVGElement interface mixin - #3543

Merged
annevk merged 2 commits into
masterfrom
annevk/htmlorsvgelement
Mar 23, 2018
Merged

Add HTMLOrSVGElement interface mixin#3543
annevk merged 2 commits into
masterfrom
annevk/htmlorsvgelement

Conversation

@annevk
@annevk annevk commented Mar 7, 2018
Copy link
Copy Markdown
Member

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 )

This exposes dataset, tabIndex, focus(), and blur() on SVG elements.

It also does away with NoncedElement.

Tests: ...

Fixes #3471.
@domenic domenic left a comment
Copy link
Copy Markdown
Member

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?)

Comment thread source Outdated
named <dfn data-export="" data-dfn-for="HTMLOrSVGElement"
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mixin interface -> interface mixin

Comment thread source Outdated
</div>

<p>Features shared between HTML and SVG elements use the <code>HTMLOrSVGElement</code> mixin
interface: <ref spec=SVG></p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mixin interface -> interface mixin

@dstorey
dstorey commented Mar 7, 2018
Copy link
Copy Markdown
Member

@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

@annevk
annevk commented Mar 7, 2018
Copy link
Copy Markdown
Member Author

@mikewest I suspect this might require downstream changes somewhere?

@annevk
annevk commented Mar 20, 2018
Copy link
Copy Markdown
Member Author

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
And align a couple other things while there.

Helps with whatwg/html#3543.
@dstorey
dstorey commented Mar 21, 2018
Copy link
Copy Markdown
Member

I should be done in the next day or two

@dstorey
dstorey commented Mar 23, 2018
Copy link
Copy Markdown
Member

@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
dstorey commented Mar 23, 2018
Copy link
Copy Markdown
Member

note that dataset already has tests for it in SVG

@annevk
annevk commented Mar 23, 2018
Copy link
Copy Markdown
Member Author

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
dstorey commented Mar 23, 2018
Copy link
Copy Markdown
Member

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
annevk commented Mar 23, 2018
Copy link
Copy Markdown
Member Author

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 pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 23, 2018
And align a couple other things while there.

Helps with whatwg/html#3543.
@annevk
annevk merged commit 81e8243 into master Mar 23, 2018
@annevk
annevk deleted the annevk/htmlorsvgelement branch March 23, 2018 10:30
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 15, 2018
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 2, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 2, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 2, 2019
…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
jwidar pushed a commit to jwidar/LatencyZeroGithub that referenced this pull request Sep 16, 2025
…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

Labels

addition/proposal New features or enhancements needs tests Moving the issue forward requires someone to write tests topic: focus

Development

Successfully merging this pull request may close these issues.

3 participants

0