diff --git a/curriculum/challenges/english/blocks/lecture-working-with-the-dom-click-events-and-web-apis/6733693bfce9a43489a355db.md b/curriculum/challenges/english/blocks/lecture-working-with-the-dom-click-events-and-web-apis/6733693bfce9a43489a355db.md index 27255690f3a..a56d8001600 100644 --- a/curriculum/challenges/english/blocks/lecture-working-with-the-dom-click-events-and-web-apis/6733693bfce9a43489a355db.md +++ b/curriculum/challenges/english/blocks/lecture-working-with-the-dom-click-events-and-web-apis/6733693bfce9a43489a355db.md @@ -5,7 +5,7 @@ challengeType: 19 dashedName: what-is-the-domcontentloaded-event-and-how-does-it-work --- -# --description-- +# --interactive-- The `DOMContentLoaded` event is fired when everything in the HTML document has been loaded and parsed. If you have external stylesheets, or images, the `DOMContentLoaded` event will not wait for those to be loaded. It will only wait for the HTML to be loaded. @@ -21,7 +21,9 @@ document.addEventListener("DOMContentLoaded", function () { Once the DOM is loaded, the function will be executed and the message `DOM is loaded.` will be logged to the console. -Now, let's take a look at another example using the `DOMContentLoaded` event. In this example, we have an image inside the HTML: +Now, let's take a look at another example using the `DOMContentLoaded` event. In this example, we have an image inside the HTML. To update the image, we can create a function that changes the `src` and `alt` attributes for the image: + +:::interactive_editor ```html