-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
MediaEmbed: Set custom element name #9375
Conversation
c7b51b3
to
e4bc1d7
Compare
c81a927
to
fc4c55b
Compare
Wow, this is super complete :) Thank you 😍 I'll check who could review this on our side. As for the solution – initially, I wasn't sure whether making this configurable is the right direction. If this feature's output is configurable this way then why not every other's? We need to be cautious in such cases. However, I think we should ask ourselves why this particular feature got this PR and no other. I think the answer is that it uses a non-standard HTML output and hence there's no convention we're able to follow (BTW, I wouldn't go with One thing that I'd consider simplifying in the PR is whether exposing |
1 similar comment
Wow, this is super complete :) Thank you 😍 I'll check who could review this on our side. As for the solution – initially, I wasn't sure whether making this configurable is the right direction. If this feature's output is configurable this way then why not every other's? We need to be cautious in such cases. However, I think we should ask ourselves why this particular feature got this PR and no other. I think the answer is that it uses a non-standard HTML output and hence there's no convention we're able to follow (BTW, I wouldn't go with One thing that I'd consider simplifying in the PR is whether exposing |
fc4c55b
to
d44ae84
Compare
If you try to build a web component with
That's why my PR is opinionated toward phasing it out, as it's introducing URL that wouldn't work with custom elements.
Created alternative PR at #9418, without a public The downside is If there's any renaming/bikeshedding - I'm happy to make adjustments! (e.g. renamed |
I also think that solution for this issue could be simplified to a form, where media embed feature supports the existing So lets move to your 2nd PR: #9418. I'm closing this one. |
This PR continues at #9418 |
See #9373 for details.
<oembed>
is an invalid name for custom elements (WhatWG, MDN).Allow setting element name (especially to
<o-embed>
). Retain compatibility with existing tags.Suggested merge commit message (convention)
Type: Message. Closes #9373
Checklist
MediaEmbed
preferredElementName
option (default:'oembed'
)elementNames
option (default:['oembed', 'o-embed']
)elementNames
option: Default includes'oembed'
:['oembed', 'o-embed']
preferredElementName
option: Default is'oembed'
Additional information
Also related: #2737 (Implement a web component to handle
<oembed url="...">
)I have an
<o-embed>
custom element polyfill here: Github, NPM CodeSandbox