TLDR: Why can't I do:
let x = Object.freeze(window)
VM431:1 Uncaught TypeError: Cannot freeze
at Function.freeze (<anonymous>)
at <anonymous>:1:16
It's an object, isn't it?
typeof(window)
"object"
I know there are other Qs that deal with sandboxing JS, but this question is really just trying to understand better why freezing window
is not allowed.