fix(event): Emit event only after compilation is completed

I worry that this might be a bit flaky... But it seems to be working so far, and tests are passing.
docs(demo): Child comments are now collapsed by default.