By Remy Sharp 8-Aug, 2014

Protecting you from yourself

JS Bin has recently had some subtle changes that help protect you from bugs in your own code.

Crash protection

Although we have loop protection in JS Bin, it’s entirely possible that your JavaScript might side-step our protection, and crash the browser anyway.

If that happens, JS Bin will automatically disable the live JavaScript rendering when the page is refresh. This means that HTML & CSS is still live rendered, but the JavaScript waits for you to click “run with JS” (or use the ctrl+return shortcut).

Automatically disabled

Loop protection

We’ve long had loop protection (video) in JS Bin which meant if you accidently wrote an infinite loop, JS Bin would quietly exit out and warn in the browser console.

To disable the loop protection: add the following in your JavaScript:

// noprotect

Now you’ll see a warning either in the footer of the JavaScript panel, or in the gutter (if you have gutter warnings enabled in your preferences).

Loop protection in JS Bin

We’ve also made the loop protection module available in our git repo under MIT, so you’re welcome re-use it in your own projects.

❤️ Love JS Bin?

Support this open source project today, and help it continue to run for another decade 🎂