mdn / content

The content behind MDN Web Docs
https://developer.mozilla.org
Other
9.22k stars 22.5k forks source link

Webassembly pages use live samples that are blank pages #16572

Open seumoo opened 2 years ago

seumoo commented 2 years ago

MDN URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table

What specific section or headline is this issue about?

Examples

What information was incorrect, unhelpful, or incomplete?

The Examples section for multiple Webassembly pages use HTML or live samples as references. The live samples are blank and users may assume the samples are not working. The samples are working since they use console logs, however, this is not obvious.

What did you expect to see?

A line on the HTML page that says "Please open your Developer Console to see console logs based on the Example".

Do you have any supporting links, references, or citations?

The following pages have this issue (not a comprehensive list):

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/webassembly/validate https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/webassembly/table/table https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/webassembly/table/get https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/webassembly/table https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/webassembly/module/customsections https://mdn.github.io/webassembly-examples/js-api-examples/index-compile.html https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/webassembly/memory/memory

Do you have anything more you want to share?

No response

wbamberg commented 2 years ago

Yes, I agree. It might be even nicer (although more work) for examples like this to update some kind of in-page log, like for instance https://developer.mozilla.org/en-US/docs/Web/API/UI_Events#keyboard_and_input_events , so people can see the output without needing to open the developer tools.