sveltejs / svelte-devtools

A browser extension to inspect Svelte application by extending your browser devtools capabilities
https://chromewebstore.google.com/detail/svelte-devtools/kfidecgcdjjfpeckbblhmfkhmlgecoff
MIT License
1.46k stars 79 forks source link

feat: fine-grained readonly markers #195

Closed davidjayb closed 5 months ago

davidjayb commented 6 months ago

This is a proposed solution to the issue I describe in https://github.com/sveltejs/svelte-devtools/issues/194

Because nodes need to serialize props and other attributes for viewing in the devtools, props lose reference to the prototype chain which can cause exceptions and other side effects to occur. I've added a local cache of the original objects that were serialized and update them before injecting the state back into svelte.