Custom Web Component Behaviours and Events

  Рет қаралды 8,337

Steve Griffith - Prof3ssorSt3v3

Steve Griffith - Prof3ssorSt3v3

Күн бұрын

Пікірлер: 33
@jamiek2039
@jamiek2039 2 жыл бұрын
Watched all of your web component videos, great job!
@suatbayrak2703
@suatbayrak2703 Жыл бұрын
Hello Steve, 13:20 I have changed my attachShadow mode property to 'open' but I still cannot access when I inspect the page with devtools, running document.querySelector('root') on the devtools console, returning null.
@FelixLuk-g9l
@FelixLuk-g9l Жыл бұрын
Hi Steve, thanks for the excellent series. I now have a better understanding of custom web components. May I suggest you to create a follow-up video to the series? A custom web component of "confirmation box" is something a lot of people would like to have, but unable to create on ones own. A confirmation box is a bit more difficult is it passes a value back to the main DOM, which is not required for most other HTML elements.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
Thanks. I don't tend to do videos that are solutions because that is what I get my students to build. Wouldn't make sense to post the answer.
@rs832
@rs832 8 ай бұрын
Thanks for the wonderful series on web components (and the many others). I am trying to create a navbar web component so I can easily add it to every page of my bootstrap application, but I cannot seem to get the drop-down functionality to work as expected. Could you please point me in the right direction or let me know if I'm barking up the wrong tree in attempting to use bootstrap and web components together? Many thanks, Professor!
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 8 ай бұрын
Try not to think of the components and the ui framework as being part of the same thing. You don't want to import a huge CSS library into a component. The component should have just the CSS that it needs to control its layout and positioning. Stuff like colors and fonts can be inherited. Components should be minimal, agnostic, portable, and easy to add to any website. Build the component so its layout and functionality work without anything but the code that you write inside the component. Then think about using CSS custom properties (variables) to be able to set colours from the parent site.
@pasduroc5422
@pasduroc5422 6 ай бұрын
Really good videos !! (the fours) Thanks
@axMf3qTI
@axMf3qTI Жыл бұрын
So why use a library as Lit? Is that just syntactic sugar or does it offer something over native web components?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
Using a library or framework means you are using a wrapper around the web component functionality. They are meant to solve common problems, give you some base styling and boilerplate code to save you time.
@fanyang-ev2bm
@fanyang-ev2bm Жыл бұрын
Hi, Professor Steve. I see that there seems to be a problem with triggering events in the tutorial. [slotchanged] should be changed to [slotchange]
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
Thanks.
@JensensHus
@JensensHus Жыл бұрын
What is the extension that colors the inline called?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
What inline?
@JensensHus
@JensensHus Жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 I mean the inlined code has different colors based on how inlined it is.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
@@JensensHus I think that comes from rainbow indent.
@JensensHus
@JensensHus Жыл бұрын
okay thank you @@SteveGriffith-Prof3ssorSt3v3
@ceyhunkucukali2864
@ceyhunkucukali2864 Жыл бұрын
Hi Steve, when I make an addition to main with the sample component you gave, the button does not appear why? setTimeout(() => { const bb = document.createElement('big-bang'); const btn = document.createElement('span'); const title = document.createElement('h2'); title.setAttribute('slot', 'title'); title.textContent = 'Test title ...'; btn.setAttribute('slot', 'done'); bb.innerHTML = `Done`; btn.textContent = 'OK'; bb.setAttribute('action', 'hello'); bb.append(title); document.getElementsByTagName('main')[0].appendChild(bb); }, 1000);
@northborneoguy
@northborneoguy 2 жыл бұрын
Hi Steve. Thanks for sharing all these videos for years now. Your style of teaching is the best and you don't try to sell anything. Just one quick question. Is it possible to make a full time income doing web development freelancing job by knowing just HTML, CSS, Javascript, React, and Node JS? Thanks!
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 жыл бұрын
Lots of people do.
@BobMossanen
@BobMossanen Жыл бұрын
Excellent presentation and content I like => showing like icons what setting in Vs code did you use?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
It is the vscode-icons extension
@raeesahmadkhan6862
@raeesahmadkhan6862 Жыл бұрын
Hi, Professor Steve. I love your videos' fantastic content. I want to ask if you are coming with React.js content anyway soon in a month or 2?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
I made a new Playlist on React that was last updated last Fall
@raeesahmadkhan6862
@raeesahmadkhan6862 Жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 alright great. I just saw them. I am starting to learn react.js soon. I am hopeful about two playlists of yours.
@lotharschmid656
@lotharschmid656 Жыл бұрын
I searched 30min why this window[this.action] undefind. I have made html File the main.js import with type="module". This not works. The window object has not the properties from main.js.😅
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
yep. If the main script is a module then that contains the scope and doesn't add things to the window object.
@magicja
@magicja Жыл бұрын
my HTML slot always returns undefined. ` let btnSlot = this.root.querySelector('p button slot'); let htmlSlot = btnSlot.assignedNodes()[0]; console.log(htmlSlot);`
@BobMossanen
@BobMossanen Жыл бұрын
I downloaded the code from get up what command can I use to run it on the browser?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
The Live Server extension in VSCode is how you can run any website in the browser.
@dannekokien441
@dannekokien441 Ай бұрын
been watching and still dont understand what slot is good for xd
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Ай бұрын
@@dannekokien441 it is a way to pass content into the component.
@BobMossanen
@BobMossanen Жыл бұрын
GitHub was cloned how do i run it on the browser
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
This is part of a playlist about web components - kzbin.info/aero/PLyuRouwmQCjnENQk6NJlckZRXOfQP0x5B
Importing ES Modules for Side Effects
6:55
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 4,2 М.
Custom Events Dispatched from Web Components
20:32
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 2,6 М.
ССЫЛКА НА ИГРУ В КОММЕНТАХ #shorts
0:36
Паша Осадчий
Рет қаралды 8 МЛН
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
Can you build a web app with vanilla Web Components in 2024?!?
30:16
Revealing the Differences between HTML Dialogs and the Popover API
24:14
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 9 М.
Web Component Styling  - What you need to know
17:09
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 10 М.
Learn Web Components In 25 Minutes
24:21
Web Dev Simplified
Рет қаралды 210 М.
Web Components An Introduction to the Future - Tobias Ljungstrom
43:51
How to add Custom Events to Web Components
29:39
Go Make Things
Рет қаралды 720
Web Components Crash Course
28:54
Traversy Media
Рет қаралды 257 М.
Building a Design System Using Standard Web Components
29:36
CSS Anchor Is The Best New CSS Feature Since Flexbox
15:39
Web Dev Simplified
Рет қаралды 378 М.