No updates to DOM till code completes

26 views
Skip to first unread message

Deepti

unread,
Jan 1, 2017, 12:13:51 AM1/1/17
to Skulpt
Hi guys,

I am running a very simple loop with Skulpt.

for i in range(n):
  x= input("enter your text")
  y = process(x)
  print("here is the result ", y)

The problem is that till the program completes, the DOM doesn't update. So when the code runs, it shows a bunch of alerts and finally displays the result together which is very confusing for an end user.
Is this because the generated js code is a blocking call? Do I need use suspensions to work around it? 
Really appreciate any suggestions. 
Reply all
Reply to author
Forward
0 new messages