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
A way to define custom built-in element #253
Comments
|
We left that out on purpose as Therefore such elements will never run on Iphone, Mac or Safari which is probably something you will want in most of the cases. What is your use case for it? |
|
Well, a lot of them. My project, Corpuscule, supports Customized Built-in Elements as first-class citizens, so I need to test them. For now, I use native API with a generated name, but I would prefer to have all the tools in one place. Regarding polyfill: not sure about |
|
Safari has introduced Custom Elements v1 in March 2017 and since then it never supported Even way before in 2016 they said they will never implement this part of the spec.
Quote from: WICG/webcomponents#544 (comment) I believe as PS: As soon as safari would show any intend to implement this - then this would be whole different story. |
|
Ok, I see your point. Quite sad that Customized Built-In Elements have such a fate. I see them as a handy tool.
Nice idea, I'll think about it. |
|
@daKmoR as I'm working on this topic right now, I would be happy to create this helper. Now, Apple has obviously chosen to slow down any progress on WebKit, and by consequence, all the Web. So I prefer to advocate for considering Safari as an obsolete browser (like IE) hoping that they reconsider their position on this matter and many others. If you still consider relevant the (very valid) point you previously made, I would be happy to create this helper as part of fullweb.dev and to make a PR linking it in the docs. |
|
The problem is that Apple maintains an iron grip on their platform, enforcing a monopoly by not allowing browser engine competition. There's literally no way to use customized built ins on iPhones without a polyfill. And Apple, as you know, commands a sizeable share of the marketplace. Apple is firm on both points: they will never support customized built in elements on their devices, and they will not allow any one else to either. We here at open-wc would love to recommend customized built-ins. We see it as an important and useful part of the spec, but we are unable to convince Apple to do the right thing here, so we can't just throw Apple's customers under the bus. Unfortunately, for the time being, customized built in elements will have to remain a userland feature. |
|
Thx @bennypowers for this answer. I totally agree with you on most of what you say here. Yet, I can't see how dynamically loading a very light polyfill, that isn't drastically affecting performance, for a standardized feature, could be "throwing customers under the bus". I would love to read more details about that, and why you globally do not recommend to use customized built-in elements, for my own education. Only discussions I could find about this in WhatWG / W3C lead me to think everybody agrees with the standard and continues working on it ... except for WebKit of course ... |
|
you're right @noelmace that's a needlessly strong phrase to use here. A good analogy is import maps. We have lots of plans for supporting import maps throughout our tooling, but since the spec is still up in the air, we're not recommending it yet. All the more so customized built-ins, for which there's absolutely no hope that they will ever be implemented (barring some movement on Cupertino's part), we can't recommend them. Sorry, "Safari doesn't count" isn't something we can reasonably recommend at this point |
|
Thx, now I better understand your point of view 🙂
So, what do you think about @daKmoR comment?
Should I release this kind of helper anyway as part of my own project, and make a PR linking it in the docs? I won't do that right away, but it would be good to know your opinion on that matter for the near future. |
|
I think that would be helpful to lots of people. Personally, I do all kinds of non-standard things in my project - importing css and graphql files usually. |
|
Ok, so I'm adding this issue to my TODO list then. Could you reopen it so that I don't forget to send the PR please? Also, nice to know about your other projects, I will keep an eye on that then, thank you! |
Just found that
defineCEfunction serves only for Custom Elements but cannot define Customized Built-In Element. Can we add a new function to helpers? A signature could be like the following:And usage:
The text was updated successfully, but these errors were encountered: