While I wrote this script following an example here on Stack Overflow I do no completely grok it nor am I convinced it is the only or best practice for handling asyncronous events that whose execution order must be enforced.
Going through this example step by step and trying different ways of achieving the same goal should be fruitful in grokking using data.Task for ansyncronous events.
In [19]:
from IPython.display import HTML, display, IFrame
In [20]:
display(IFrame('https://rawgit.com/dm-wyncode/a57c4f5ea5c321e10a41e976e233cd56/raw/5fec33d8ea310696f0b75479f4846a08b094dc98/index.js', height=800, width=800))