News for hackers. Stuff that matters.
Re:Weird Debugging Tricks the Browser Doesn't Want You to Know by hashseed on Sunday November 12, 2023 @02:27PM (#38243302)
I work on Chrome DevTools.

The reason is absolutely security concerns. You don't want to leak a function that can expose a list of all objects on the JS heap.

Re:Weird Debugging Tricks the Browser Doesn't Want You to Know by chrismorgan on Monday November 13, 2023 @01:44AM (#38247643)
I don’t understand. The page can’t access these things, only dev tools, so any action to expose it would still have to be mediated by user action; and even then, what’s so bad about exposing this? Everything in it is scoped to the document, and if it can expose things you don’t want exposed, then so can getEventListeners(), right? Yet getEventListeners returns an actual value. What’s the actual security problem of being able to list all objects on the JS heap?