]> git.parisson.com Git - pdf.js.git/commitdiff
Catch multiline log function calls.
authorKalervo Kujala <kkujala@>
Wed, 24 Aug 2011 16:11:38 +0000 (19:11 +0300)
committerKalervo Kujala <kkujala@>
Wed, 24 Aug 2011 16:11:38 +0000 (19:11 +0300)
test/driver.js

index cbb226ddabd18f808bbf68eb5562283d0e84b35c..9fa1cfa8ce3f2c633320321acef5c7db2ce6bce0 100644 (file)
@@ -221,8 +221,8 @@ function checkScrolling() {
 }
 
 function log(str) {
-  stdout.insertAdjacentHTML("BeforeEnd", str);
+  stdout.insertAdjacentHTML('BeforeEnd', str);
 
-  if (str.charAt(str.length - 1) == '\n')
+  if (str.lastIndexOf('\n') >= 0)
     checkScrolling();
 }