Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed typos in DOM Clobbering Cheatsheet "Clobberng" to "Clobbering" #1474

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading