4 ms·
The HTML engine probably has an internal list of ids to quickly look them up. The dev tools, however, access it externally. It's quite likely they simple use `t
by Sebb767 5y ago
The HTML engine probably has an internal list of ids to quickly look them up. The dev tools, however, access it externally. It's quite likely they simple use `treeNode->getId()` without being aware that this call respects JS overwrites.
It might even be a feature; the C# debugger, for example, will call your custom `toString()` function in order to give a nice representation in the debug window. The problem here is, of course, that the debugger is running against untrusted code.
- bsdubernerd 5y agoThis sounds problematic from a debugger perspective if the function does any sort of side effect, and I'd consider this a bug as well. In fact, I'd probably argue that causing user-code to run at debug time is not a good idea even if the function is guaranteed to be side-effect free.