Fixed #71 - Provide a `debug` flag to any snippet
This MR proposes to enable such flag within each injected, or simply exported callback:
- the injected code will use a scoped
debugflag that uses the regular scoped one value - the filter must start with
debug;followed by the rest of the regular snippet
This should allow both developers and wizards to easily update any filter enabling the debugging session without needing to change anything the snippet they are currently using, if not prefixing it via debug;.
This MR will not expose any significant debugging improvement, as these will follow per each needed snippet in separate MRs.
Improvements
This MR also offers the following improvements over current state:
- we no longer enable
"use strict"in the global scope, yet we run our code always as strict - we no longer pollute the global
windowwith our own function, everything runs in a closure
Edited by Andrea Giammarchi