@@ -708,6 +708,8 @@ export class ActiveCode extends RunestoneBase {
708708 this . output = document . createElement ( "pre" ) ;
709709 this . output . id = this . divid + "_stdout" ;
710710 $ ( this . output ) . css ( "visibility" , "hidden" ) ;
711+ $ ( this . output ) . css ( "max-height" , "400px" ) ;
712+ $ ( this . output ) . css ( "overflow" , "auto" ) ;
711713 this . graphics = document . createElement ( "div" ) ;
712714 this . graphics . id = this . divid + "_graphics" ;
713715 $ ( this . graphics ) . addClass ( "ac-canvas" ) ;
@@ -1104,25 +1106,26 @@ Yet another is that there is an internal error. The internal error message is:
11041106 . replace ( / > / g, ">" )
11051107 . replace ( / \n / g, "<br/>" ) ;
11061108 // todo: try to make this use the suspension mechanism in skulpt
1107- return Promise . resolve ( ) . then (
1108- function ( ) {
1109+ return new Sk . misceval . promiseToSuspension ( new Promise ( function ( resolve ) {
11091110 setTimeout (
11101111 function ( ) {
11111112 if ( this . outputLineCount < 1000 ) {
11121113 $ ( this . output ) . append ( text ) ;
11131114 this . outputLineCount += 1 ;
1115+ resolve ( Sk . builtin . none . none$ )
11141116 } else {
11151117 if ( this . outputLineCount == 1000 ) {
11161118 $ ( this . output ) . append ( "Too Much output" ) ;
11171119 this . outputLineCount += 1 ;
11181120 stopExecution = true ;
1121+ resolve ( Sk . builtin . none . none$ )
11191122 }
11201123 }
11211124 } . bind ( this ) ,
1122- 0
1125+ 1
11231126 ) ;
11241127 } . bind ( this )
1125- ) ;
1128+ ) ) ;
11261129 }
11271130
11281131 filewriter ( fobj , bytes ) {
0 commit comments