Now there is this nifty thing in coroutine Python:
awaitable asyncio.shield(aw)
Protect an awaitable object from being cancelled
https://docs.python.org/3/library/asyncio-task.html#shielding-from-cancellation
Can we bring it to a web Prolog and what would be the effect?
One simple way to bring it to a web Prolog is to control the auto yielding.
Here some results with shield, sometimes the experience of a VDOM:

Without shield/1
, capitalizing of auto yield for incremental rendering:

In the below I used an adaptation of another goody from Python to JavaScript:
awaitable asyncio.gather(aws , return_exceptions=False)
Running Tasks Concurrently
https://docs.python.org/3/library/asyncio-task.html#running-tasks-concurrently
And it is also using shield/1
to make a DOM update atomic:
buzz(0, _, _, _, _) :- !.
buzz(I, X, Y, A, ID) :-
R is A*pi/180,
random(V), W is V*10,
X2 is X+W*sin(R),
Y2 is Y-W*cos(R),
random(U), A2 is A+U*30-15,
shield((tag_goto(ID),
tag_remove,
draw(X2, Y2, A2, ID))),
I2 is I-1,
sleep(200), % measured in milliseconds
buzz(I2, X2, Y2, A2, ID).
The beginning of a take on Gnat Attack (1992, Mario Paint):
