on master help sign in
Provide a fake window in needed, making runtime run on node.js
commit117294ee943c3a70034736a93726c798d64b72a6 authorEvan Czaplicki <info@elm-lang.org> dateWed 30 Oct 2013, 16:33 (13 years ago) parent71fb0a3
1 file changed+1
runtime/Utils.js+1
runtime/Utils.js+1
@@ -34,6 +34,7 @@ ElmRuntime.filterDeadInputs = function(inputs) {
3434
3535// define the draw function
3636var vendors = ['ms', 'moz', 'webkit', 'o'];
37+var window = window || {};
3738for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
3839 window.requestAnimationFrame = window[vendors[i]+'RequestAnimationFrame'];
3940 window.cancelAnimationFrame = window[vendors[i]+'CancelAnimationFrame'] ||