Skip to content

Fixed #71 - Provide a `debug` flag to any snippet

This MR proposes to enable such flag within each injected, or simply exported callback:

  1. the injected code will use a scoped debug flag that uses the regular scoped one value
  2. 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:

  1. we no longer enable "use strict" in the global scope, yet we run our code always as strict
  2. we no longer pollute the global window with our own function, everything runs in a closure
Edited by Andrea Giammarchi

Merge request reports

Loading