Hi,
In the javascript reference docs it’s quite common that no html/css is involved, we only want to demonstrate some pure js functionality.
In this case embedding html and css code is simply waste of space.
On the other hand if we don’t do that then the user doesn’t see the result, so it is not so “live” anymore.
Lot of examples look like:
`
let a = “text”;
a;
`
It works fine in a real console but the document of the iframe remains empty, so not very useful here.
In my opinion the EmbedLiveSample macro could be enhanced in a way to display the result of the code instead of showing an empty iframe.
Overriding console.log would be an option.
What do you think?