From 1781a9e5949b459ed2df8a1b8d9b43daef3b1822 Mon Sep 17 00:00:00 2001 From: Ong Date: Wed, 7 Aug 2024 18:01:36 -0400 Subject: [PATCH] fixed typos in DOM Clobbering Cheatsheet --- cheatsheets/DOM_Clobbering_Prevention_Cheat_Sheet.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cheatsheets/DOM_Clobbering_Prevention_Cheat_Sheet.md b/cheatsheets/DOM_Clobbering_Prevention_Cheat_Sheet.md index 8139e5da6f..31d6b9f6fc 100644 --- a/cheatsheets/DOM_Clobbering_Prevention_Cheat_Sheet.md +++ b/cheatsheets/DOM_Clobbering_Prevention_Cheat_Sheet.md @@ -168,13 +168,13 @@ Use `strict` mode to prevent unintended global variable creation, and to [raise ### \#10: Apply Browser Feature Detection -Instead of relying on browser-specific features or properties, use feature detection to determine whether a feature is supported before using it. This can help prevent errors and DOM Clobberng that might arise when using those features in unsupported browsers. +Instead of relying on browser-specific features or properties, use feature detection to determine whether a feature is supported before using it. This can help prevent errors and DOM Clobbering that might arise when using those features in unsupported browsers. **Hint:** Unsupported feature APIs can act as an undefined variable/property in unsupported browsers, making them clobberable. ### \#11: Limit Variables to Local Scope -Global variables are more prone to being overwritten by DOM Clobberng. Whenever possible, use local variables and object properties. +Global variables are more prone to being overwritten by DOM Clobbering. Whenever possible, use local variables and object properties. ### \#12: Use Unique Variable Names In Production