From 37caab943fac09bc942518ddde465250fdbb4cc8 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Tue, 17 Jan 2023 17:05:57 -0600 Subject: [PATCH] revise 2 sentences in custom-elements ended up rewriting due to grammar... I originally used a semicolon but an em-dash fit better --- 8-web-components/2-custom-elements/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/8-web-components/2-custom-elements/article.md b/8-web-components/2-custom-elements/article.md index a84ed11923..4d27eb0f8c 100644 --- a/8-web-components/2-custom-elements/article.md +++ b/8-web-components/2-custom-elements/article.md @@ -242,9 +242,9 @@ customElements.define('user-info', class extends HTMLElement { If you run it, the `alert` is empty. -That's exactly because there are no children on that stage, the DOM is unfinished. HTML parser connected the custom element ``, and is going to proceed to its children, but just didn't yet. +That's exactly because when the HTML parser connects the `` element, its children have not been processed yet — the DOM is incomplete. In effect, the children don't exist. -If we'd like to pass information to custom element, we can use attributes. They are available immediately. +If we'd like to pass information to a custom element, we can use attributes. They are available immediately. Or, if we really need the children, we can defer access to them with zero-delay `setTimeout`.