The DOM in 4 minutes

The DOM in 4 minutes

Aaron Jack

3 года назад

130,867 Просмотров

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


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

@tylerrivers6422
@tylerrivers6422 - 18.09.2023 19:42

THANK YOU BRO, thank you.

Ответить
@TwistrJO
@TwistrJO - 21.09.2023 09:39

Bro ain’t no way I was the only one who came here thinking he was going to explain “The Depth Of Market” for traders 😂😅

Ответить
@aaliyahjardien
@aaliyahjardien - 26.09.2023 13:30

Just came across your channel now, thanks for the straight forward yet informative explanations. 💯

Ответить
@MrHabib57
@MrHabib57 - 28.09.2023 12:29

Thanks for your short but useful video

Ответить
@mladenkaorlic
@mladenkaorlic - 21.10.2023 21:40

please remove background music

Ответить
@FailSonOfAnarchy
@FailSonOfAnarchy - 07.11.2023 19:03

OK, so what's the sub?

Ответить
@houssamadjerid
@houssamadjerid - 18.11.2023 10:40

finally, someone explained the DOM in a way that answered my questions. thank you, bro.

Ответить
@robertlawson4295
@robertlawson4295 - 30.11.2023 04:43

You've just misled a lot of people ... the DOM is NOT a "Javascript object"; it is a data tree structure. Here's the definition by Codecademy : "The DOM is represented as a type of data structure called a tree. Every object in the DOM is hierarchically under another object, and any object can have multiple children but only one parent. Each DOM object “owns” its children. If you remove an object from the DOM, all of its children will also be removed with it." Javascript creates an object within itself that represents the contents of the DOM tree structure at any given moment.

Ответить
@yatin1370
@yatin1370 - 14.12.2023 13:53

My mind is blown after the clarity this video gave me. This might be one of the best things to happen to me in my JS journey.

Ответить
@pampagrimaldi8584
@pampagrimaldi8584 - 22.12.2023 14:00

incredible! super clear, thanks for making this video mate.

Ответить
@sansrit
@sansrit - 29.12.2023 17:08

now i am clear thank you dear

Ответить
@serwaapreimann
@serwaapreimann - 02.01.2024 21:39

Took me 1 year to try to understand this but thanks to your video it makes soooooooooooo much sense!! Thank you Aaron.

Ответить
@SakuraWulf
@SakuraWulf - 21.01.2024 14:19

I was doing the Zero to Mastery "Complete Web Developer" course and when Andrei got to the DOM part, I felt completely lost. It felt like he just jumped into using another foreign language without a good explanation. This video helped put things into perspective. Thank you.

Ответить
@TheMasHachibi
@TheMasHachibi - 26.01.2024 11:56

Great explantaion . new subscriber

Ответить
@chiraz-p2g
@chiraz-p2g - 03.02.2024 14:53

thank you so much, very helpful video

Ответить
@MartinKandrac-g3q
@MartinKandrac-g3q - 26.02.2024 09:28

Prera

Ответить
@learner8084
@learner8084 - 03.03.2024 05:26

great great great video....

Ответить
@InterestsExplorer
@InterestsExplorer - 08.03.2024 09:13

that was easy, clear and awesome!!

Ответить
@teenytinyteetee
@teenytinyteetee - 10.03.2024 01:24

idk why you blewm my mind when you said a style is a subobject with color property. it all makes sense.

Ответить
@mrdajve
@mrdajve - 13.03.2024 04:36

Kudos for the Alan Partridge visual.

Ответить
@stannisbarracuda5693
@stannisbarracuda5693 - 20.03.2024 01:24

Really good explain not gonna lie

Ответить
@ukaszkiepas57
@ukaszkiepas57 - 24.03.2024 22:48

thank you mate ! :)

Ответить
@kennyaga3859
@kennyaga3859 - 04.04.2024 14:42

Simple clear explanation.
Thanks..

Ответить
@valenciawalker6498
@valenciawalker6498 - 11.04.2024 20:13

Great explanation

Ответить
@zabinoori49
@zabinoori49 - 15.04.2024 10:15

Nice and simple : )

Ответить
@VolkanBozkurt0x
@VolkanBozkurt0x - 16.04.2024 15:52

If you guys want to use the DOM objects now, you can try by writing document.querySelector(".ytp-chrome-bottom").style.display='None' on the console now and see what happens.

Ответить
@uxus-oh3qk
@uxus-oh3qk - 22.06.2024 09:11

Worst explanation...ever.

Ответить
@brian7989
@brian7989 - 24.07.2024 15:21

Thank you so much for making this video!

Ответить
@frankdearr2772
@frankdearr2772 - 12.08.2024 09:47

👍

Ответить
@assancamara7178
@assancamara7178 - 05.09.2024 18:01

You deserve a million likes for this explanation

Ответить
@GabrielaOliveira-
@GabrielaOliveira- - 05.09.2024 20:55

Great content. Thanks!

Ответить
@noelpaul713
@noelpaul713 - 08.09.2024 08:53

Man this is the best explaination. Watched multiple videos about basic DOMs and they are just trash and complicated. You're a hero dude. Thank you!

Ответить
@sajidsaleem9110
@sajidsaleem9110 - 29.09.2024 09:18

Amazing, but the speed was to fast for me. Decreasing the play back speed was also not fun at all -> Overall USEFUL

Ответить
@DevanshiTyagi-o4d
@DevanshiTyagi-o4d - 01.10.2024 17:35

I have hit like just for the perfection of your teeth

Ответить
@vHeart.
@vHeart. - 22.10.2024 14:27

Cool. Now explain the Sub in this dynamic.

Ответить
@SomeGuyInBrisVegas
@SomeGuyInBrisVegas - 16.11.2024 00:20

Wow. Great video. Concise and Lean. No fat, no padding. Well done.

Ответить
@PirateOfTheNorth
@PirateOfTheNorth - 21.11.2024 12:53

This was one of the easiest to understand explanations. My professor explained it so complicated.

Ответить
@1yavuzahmet
@1yavuzahmet - 29.11.2024 19:57

Thank you for your wonderful explanation style.

Ответить
@XxavierPolk
@XxavierPolk - 09.12.2024 06:18

YO I AM IN SCHOOL FOR THIS AND THIS WAS EASILY EXPLAINED IN A FEW MINUTES. THANK YOU!!

Ответить
@PratikSharma_01
@PratikSharma_01 - 11.12.2024 02:33

To understand the difference between HTML and the DOM, imagine this real-life analogy:

---

### *Scenario: A Recipe and a Cooked Dish*
1. **HTML as the Recipe**:
- The *HTML* is like a **recipe book**.
- It contains a *static list of instructions* and the ingredients needed to prepare a dish.
- You cannot eat the recipe, but it serves as the blueprint.

**Example**:
- Recipe: "Make spaghetti with tomato sauce."

2. **DOM as the Cooked Dish**:
- The *DOM* is like the *actual dish* you create by following the recipe.
- Once the browser (the cook) processes the recipe (HTML), it creates the cooked dish (DOM).
- Unlike the recipe, the dish can be **modified or customized in real-time**. For instance, you might add more salt, remove some vegetables, or serve it on a different plate.

**Example**:
- Adding more cheese to the spaghetti after it’s served (just like modifying content dynamically via the DOM).

---

### *How the Recipe (HTML) and Dish (DOM) Interact*
1. **HTML is Static**:
- The recipe stays the same once it’s written. You cannot alter the recipe itself.
- Similarly, HTML is static content—it defines the structure but doesn’t change on its own.

2. **DOM is Dynamic**:
- The dish (DOM) can be altered based on needs or preferences, just like you can tweak the dish after it's cooked.
- For example:
- You can add or remove ingredients (elements in the DOM).
- You can change the serving style (modify CSS dynamically).
- You can serve additional portions (add new elements).

---

### *Real-Life DOM Example*
Let’s say you’re visiting a restaurant (the website):
1. **HTML Recipe**: The menu shows "Spaghetti with Tomato Sauce."
2. **DOM Dish**: When the dish is served, you (the user) decide:
- Add more cheese: `document.querySelector('spaghetti').addCheese();`
- Remove mushrooms: `document.querySelector('mushrooms').remove();`
- Replace tomato sauce with Alfredo sauce: `document.querySelector('sauce').setType('Alfredo');`

The server doesn’t change the menu (HTML), but the dish (DOM) can be adjusted as per your needs, giving you a customized experience.

---

### *Key Takeaways*
- **HTML**: Recipe = Blueprint (static and unchanging).
- **DOM**: Dish = Live, customizable version of the recipe.
- **Browser (Chef)**: Transforms the recipe into the dish and allows real-time changes based on user inputs.

Ответить
@mgusa9372
@mgusa9372 - 14.12.2024 12:47

Awesome. Like ususal.

Ответить
@oluwadamilarealeji
@oluwadamilarealeji - 19.12.2024 21:18

without the JS, you might as well print out your HTML with printer 😂😂😂

Thank you so much. This came out so clear and understandable

Ответить
@omkarmahajan2768
@omkarmahajan2768 - 23.01.2025 20:30

Bro you are a GOD. also cover api aspect

Ответить
@afahoshea6066
@afahoshea6066 - 13.02.2025 18:44

Thank you for this.
I am grateful man.

Ответить
@noid9895
@noid9895 - 15.02.2025 21:37

Thank you

Ответить
@askhurra
@askhurra - 27.02.2025 03:28

I'm don't know if I'm dumb af, but this is the first time that I fully understand what DOM is. Thanks bro! (but pls use less music)

Ответить
@TurbidMidday41
@TurbidMidday41 - 08.03.2025 17:10

Thanks alot bro

Ответить