Backbone.js Online Compiler

About the Backbone.js compiler

Lightweight JavaScript MVC framework. Runs in your browser. Run Backbone.js code in your browser with no install and no signup — the editor, the input and the output share one screen. Backbone.js compiles and runs on your own device through WebAssembly, so once the page has loaded it keeps working without a network connection.

Press Run to execute the program, edit it and press Run again, or paste your own code over it. Everything you type stays in the page; the editor caches your work locally so a reload does not lose it.

A Backbone.js example

This is the program the Backbone.js editor opens with — run it as it is, then change it.

<!DOCTYPE html>
<html>
<head>
  <script src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/underscore@1/underscore-umd-min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/backbone@1/backbone-min.js"></script>
  <style>body { font-family: sans-serif; padding: 2rem; } #app { max-width: 400px; } input { width: 100%; padding: 0.5rem; margin: 0.5rem 0; } li { padding: 0.3rem 0; cursor: pointer; } li.done { text-decoration: line-through; color: #999; }</style>
</head>
<body>
  <h1>Backbone.js Todo</h1>
  <div id="app"></div>
  <script>
    var Todo = Backbone.Model.extend({ defaults: { title: '', done: false }, toggle: function() { this.set('done', !this.get('done')); } });
    var TodoList = Backbone.Collection.extend({ model: Todo });
    var todos = new TodoList();
    var AppView = Backbone.View.extend({
      el: '#app',
      initialize: function() {
        this.input = $('<input placeholder="Add todo...">').appendTo(this.el);
        this.ul = $('<ul>').appendTo(this.el);
        this.listenTo(todos, 'add reset', this.render);
        this.listenTo(todos, 'change', this.render);
      },
      events: { 'keypress input': 'addTodo' },

The editor opens with the full program.

More Web UI Frameworks compilers

Browse all 109 languages — the same editor runs each of them, in the browser or on a shared runner.