Steps to replicate the issue (include links if applicable):
- Create a non-packaged gadget (without package in gadget definition) with code like const test = 1;
- Load a page with this gadget and ?debug=1
What happens?:
test is leaked to global scope, which doesn't happen in normal mode and ?debug=2.
What should have happened instead?:
test is not leaked, which is consistent with normal mode.
Other information (browser name/version, screenshots, etc.):
I believe we should keep this consistent because it can introduce unexpected bugs and conflicts when debugging.