Easily Build a Progress Bar with Web Components in JavaScript

Easily Build a Progress Bar with Web Components in JavaScript

dcode

2 года назад

12,440 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@randomtimessomehow
@randomtimessomehow - 24.02.2023 17:25

Why did you not extend the native progress element class, like so: class CustomProgress extends HTMLProgressElement { ... }

Ответить
@danieltriana1937
@danieltriana1937 - 14.12.2022 04:41

Nice video, I was doing a 3 hour course on this, but your just explain it with a fun project in just 20 min, thanks.

Ответить
@Alex-bc3xe
@Alex-bc3xe - 13.08.2022 11:31

I love the fact that you focus yourself on Javascript and not on any framework, cause like I always said, people need to learn how to walk very good in order to run. Everybody wants to start right away with frameworks but I learned more when I got back to the power of just Javascript to understand exactly what frameworks solve.

Ответить
@Leo-hs8je
@Leo-hs8je - 27.02.2022 03:12

In HTML <progress> is valid tag, not <progress-bar>.

Ответить
@lev_bul
@lev_bul - 25.02.2022 17:01

BAN

Ответить
@lev_bul
@lev_bul - 25.02.2022 17:00

ERROR: undefined

Ответить
@lev_bul
@lev_bul - 25.02.2022 16:13

ERROR NO AWESOME!!!!!!!!!!!!!

Ответить
@leonvanrijswijk8409
@leonvanrijswijk8409 - 25.02.2022 14:12

This is awesome. Very well explained. Thanks.

Ответить
@cloudpuncher4615
@cloudpuncher4615 - 25.02.2022 09:27

Hey mate, great video like always...

Maybe for your next WC video you could highlight that shadow DOM isn't necessary for custom-elements. Sometimes I just use custom-elements just to trigger template renders on proceeding templates on connectedCallback() (connected callback triggers before childNodes of the custom-element is parsed)

Also everybody seems to be using innerHTML to "hydrate" custom-elements yet there are quite a few alternatives like using a template inside the custom-element then cloning and filling with textContent. You can even use a recursive (or generator yield*) function to createElement + Object. assign properties incl textContent for JSON trees.

Another interesting topic is using CSS custom-element::part(x) for styling inside Shadow Dom.

One of the huge pros of custom-elements is readability to developers and combined with aria roles is substantially better than <div> soup...

Ответить
@sateeshbharti
@sateeshbharti - 24.02.2022 21:56

I always wondered, did you get into web dev because your name is "DOM"? Big fan of your content.

Ответить
@Shawn-Mosher
@Shawn-Mosher - 24.02.2022 21:30

Web components are the future in my opinion

Ответить
@angmarliche9187
@angmarliche9187 - 24.02.2022 20:48

Concise, interesting and simple explanation with a simple example, that can help beginners understand Web Components and build their own components. Thanks Dom!

Ответить
@hassaneoutouaya
@hassaneoutouaya - 24.02.2022 19:43

THANK YOU SO MUCH !
I think that it will be great idea if you build a mini-project using native JavaScript web components in the coming days. And share it with us.

Ответить
@maskman4821
@maskman4821 - 24.02.2022 18:48

This is an awesome tutorial 👍

Ответить
@TheBorninmotion
@TheBorninmotion - 24.02.2022 18:33

web components are very underrated , please make more tuts with wcs , we dont need frameworks at all.

Ответить
@ban-prem-001
@ban-prem-001 - 24.02.2022 17:45

This channel is the best resources for changing someone who hate vanilla javascript, to be a vanilla javascript simp

Ответить