From 22290590cbfd2ec256ec69da57c173cc07fc651f Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 29 Mar 2016 17:02:56 +0200 Subject: [PATCH] don't rely on window scope in typingTest.js --- www/_socket/typingTest.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/_socket/typingTest.js b/www/_socket/typingTest.js index 8ade1caf7..af09c72c8 100644 --- a/www/_socket/typingTest.js +++ b/www/_socket/typingTest.js @@ -18,10 +18,10 @@ define(function () { }; }; - var testInput = function (el, offset, cb) { + var testInput = function (doc, el, offset, cb) { var i = 0, j = offset, - input = "The quick red fox jumps over the lazy brown dog. ", + input = " The quick red fox jumps over the lazy brown dog.", l = input.length, errors = 0, max_errors = 15, @@ -43,7 +43,7 @@ define(function () { console.error(err); var next = document.createTextNode(""); - window.inner.appendChild(next); + doc.appendChild(next); el = next; j = -1; }