What is the JavaScript equivalent of C++ std::flush?

I am trying to port one of the programs I’ve written in my own programming language to the web using WebAssembly. However, I’ve run into a problem. Namely, one of my programs is supposed to print all the permutations of the digits of a number entered by the user. You can see the live version. The problem is that, when you enter some number with a relatively large number of digits, such as “1234567”, even though the program starts finding permutations almost immediately, and prints them immediately into innerHTML, the browser doesn’t display any permutations at all until all of