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

Rewrite the "Freezing Object Properties" section #14

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

ericcornelissen
Copy link
Contributor

Closes #13

This rewrites the existing Freezing Object Properties section to a section about marking properties as non-configurable. I'm not sure what to do with the 3rd reference since I don't have access to it...

I hope this covers the discussion in #13 accurately, changing the focus of the section to Object.defineProperty (or, more specifically, using configurable:false) and omitting Object.freeze (and related language) because of its limited and browser-specific use. I did verify that clobbering before defining fails (as written), and also checked whether you can (re)defineProperty standard document properties such as head and it seems you can! Let me know if you think there's something to improve about my changes or if there's something else we should test 🙂

Also, I included a correction for a typo I made in #12.

@ericcornelissen ericcornelissen changed the title Patch 1 Rewrite the "Freezing Object Properties" section Nov 14, 2024
@SoheilKhodayari SoheilKhodayari merged commit 93e4cbb into SoheilKhodayari:master Nov 14, 2024
1 check failed
@SoheilKhodayari
Copy link
Owner

Great, thanks for the PR. I merged it with the master branch.

@ericcornelissen ericcornelissen deleted the patch-1 branch November 14, 2024 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question about "Freezing Object Properties"
2 participants