mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-27 13:40:37 -10:00
In the regular webconsole input, on Enter, we check that the input is a compilable unit, so the user don't accidentally execute an incomplete snippet. In the editor mode, the user will have to use Ctrl/Cmd + Enter to execute, so we don't have to worry about Enter (it will simply append a new line). And since the user might deal with a large number of characters, we don't want to prevent them to execute. If it's malformed, they will get an error in the output and can fix their input easily, since it wasn't cleared. The patch adds a test to ensure this work as expected. Differential Revision: https://phabricator.services.mozilla.com/D34522