Skip to content

Commit

Permalink
fixed typos in DOM Clobbering Cheatsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
OngDevLab committed Aug 7, 2024
1 parent de97355 commit 1781a9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cheatsheets/DOM_Clobbering_Prevention_Cheat_Sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1781a9e

Please sign in to comment.