Truly independent web browser
<!DOCTYPE html>
<script src="../../include.js"></script>
<script src="frame-in-flight.js"></script>
<div id="box">first</div>
<script>
// The frame a rendering update commits is sampled by the render owner and recorded and presented beside the event
// loop: taking its recording in between two tasks presents nothing more. A change of text alone has no style update to fly first.
asyncTest(async done => {
await whileRecordingInFlight(() => {
box.firstChild.data = "second";
}, () => {});
while (internals.frameSchedulerState() !== "idle")
await nextTask();
println(`presented by: ${internals.lastFramePresentedBy(document)}`);
println(`text: ${box.textContent}`);
done();
});
</script>