1
00:00:00,240 --> 00:00:06,480
This lesson, we're looking at dorm content, which is a method that gets invoked once the dorm content

2
00:00:06,480 --> 00:00:11,640
has loaded and this is useful, you might see it with a jury where jury document ready.

3
00:00:11,970 --> 00:00:18,510
So this is the same thing where this is an event that can get triggered once the dorm content has finished

4
00:00:18,510 --> 00:00:19,110
loading.

5
00:00:19,110 --> 00:00:25,800
All the HTML document is completely loaded and parsed and ready to be used and interacted with using

6
00:00:25,800 --> 00:00:26,490
JavaScript.

7
00:00:26,760 --> 00:00:29,630
This is an example at Mozilla, a developer network.

8
00:00:29,970 --> 00:00:31,650
So how that can be used.

9
00:00:31,740 --> 00:00:36,330
And as you can see, we're adding an event listener and that is dom content loaded.

10
00:00:36,480 --> 00:00:42,890
And once that event occurs, then output into the console dom fully loaded and passed.

11
00:00:43,140 --> 00:00:46,130
So go ahead, pause the video and try the suit.

12
00:00:46,380 --> 00:00:53,040
Add in window add event listener dom content loaded and invoker function when the DOM content has a

13
00:00:53,040 --> 00:00:56,070
loaded and output a message in the console.

14
00:00:56,100 --> 00:00:57,680
So walk you through the example.

15
00:00:57,990 --> 00:01:06,210
So we've got the window object add event listener and that that we're listening for is dom content loaded

16
00:01:06,230 --> 00:01:06,660
event.

17
00:01:06,750 --> 00:01:13,170
And then whenever that event is triggered we're going to output a message in the console and this will

18
00:01:13,170 --> 00:01:13,860
just be ready.

19
00:01:14,250 --> 00:01:17,820
So we refresh and we instantly get a message ready.

20
00:01:18,000 --> 00:01:20,060
So that means that we're ready to interact with the DOM.
