From 5bfde95be5d11195a7899449f78b7c6659477252 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Mon, 28 Feb 2022 18:54:03 -0600 Subject: [PATCH] Adjust nullable element section --- src/_tutorials/web/low-level-html/connect-dart-html.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_tutorials/web/low-level-html/connect-dart-html.md b/src/_tutorials/web/low-level-html/connect-dart-html.md index a82485e52a..899e246cff 100644 --- a/src/_tutorials/web/low-level-html/connect-dart-html.md +++ b/src/_tutorials/web/low-level-html/connect-dart-html.md @@ -288,7 +288,7 @@ which returns multiple `Element` objects via a list of elements—`List`—all of which match the provided selector. -### Using nullable properties +### Handling nullable elements Because DOM elements might be missing, the `querySelector()` function returns a nullable result, @@ -324,6 +324,7 @@ the queried element to the expected type: {% prettify dart tag=pre+code %} final paragraph = querySelector('#RipVanWinkle') [!as ParagraphElement!]; +paragraph.text = 'Wake up, sleepy head!'; {% endprettify %} To learn more about nullable types and null safety in general,