// window on load
window.onload = function () {

    // get run code button
    document.getElementById("run-code").addEventListener("click", function () {
        // evaluate the code to run
        eval(document.getElementById("js-code-to-run").innerText);
    });
};

// window on load
window.onload = function () {

    // get run code button
    document.getElementById("run-code").addEventListener("click", function () {
        // evaluate the code to run
        eval(document.getElementById("js-code-to-run").innerHTML);
    });
};

Use innerHTML to be firefox compatible
Use innerHTML to be firefox compatible
