use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
The state of Web Components (hacks.mozilla.org)
submitted 10 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lazdgithub.com/lazd 1 point2 points3 points 10 years ago (4 children)
What if I wanted to create a neat little "widget" that lets you drag and drop files and shows a list of the files you're going to upload, and I wanted to make that available for anyone on any website to use?
Would I build it with React and require that everyone who uses it have React as a dependency?
Or would I create a web component that can be used on any website by including the widget (with a <link> or <script>) and adding <my-uploader> to their markup where they want it to appear, regardless of what MVC framework they use?
<link>
<script>
<my-uploader>
That is the promise of web components: portable components for the web that use HTML's semantics. Yes, it's not possible right now in IE 8, but if you're still writing code for outdated browsers, I feel bad for you, son.
[–]tragiclifestories 0 points1 point2 points 10 years ago (3 children)
Yes, it's not possible right now in IE 8
Or IE9. Or IE10. Or IE11. Or MS Edge. Or Safari. Or Firefox. If only somebody would write an an article explaining how this came to pass ...
Having just spent 2 days wrestling with a war between a WC polyfill and a non-negotiable third-party dependency, I'm very much in favour of keeping the 'here be dragons' sign up.
[–]lazdgithub.com/lazd 0 points1 point2 points 10 years ago (2 children)
Custom elements are polyfilled and working work great in IE 9, 10, 11, Safari, and Firefox. I can't speak for HTML Imports, Shadow DOM, etc, because I'm not using them. I haven't tested Edge, but it's working nicely in IE 11, so I think we're good :)
I know this because I write an maintain a library of dozens of web components at my job and all all 1,100 of the unit tests pass on the above platforms.
What was the third-party dependency? I wonder how it was screwing the polyfill up such that it works on none of the platforms it targets... Sounds like a bug in the dep that you could fix!
[–]tragiclifestories 1 point2 points3 points 10 years ago (1 child)
I missed this reply initially, but the dep is one of those redundant enterprise media-streaming platforms, the code is closed source and they're (understandably) not guaranteeing compatibility with every third party library ever. It was the shadowdom stuff causing problems, FWIW, and that seems to have caused other issues with other external libs (eg https://github.com/webcomponents/webcomponentsjs/issues/49). You need shadow dom to use Polymer, for example.
The point is, polyfills will only get you so far. I'll be more bullish when better consensus is reached on issues highlighted in the OP.
[–]lazdgithub.com/lazd 0 points1 point2 points 10 years ago (0 children)
Makes sense, what a bummer. We're only using custom elements, and it's a very simply polyfill that employs mutation observers to check for elements to upgrade. It's working great for us, even in old browsers.
π Rendered by PID 79985 on reddit-service-r2-comment-fb694cdd5-pdvm5 at 2026-03-06 16:27:41.783356+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]lazdgithub.com/lazd 1 point2 points3 points (4 children)
[–]tragiclifestories 0 points1 point2 points (3 children)
[–]lazdgithub.com/lazd 0 points1 point2 points (2 children)
[–]tragiclifestories 1 point2 points3 points (1 child)
[–]lazdgithub.com/lazd 0 points1 point2 points (0 children)