mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.17k stars 488 forks source link

The example on this page doesn't work #10730

Open codyswanner opened 4 months ago

codyswanner commented 4 months ago

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Blob

What specific section or headline is this issue about?

Creating a URL representing the contents of a typed array

What information was incorrect, unhelpful, or incomplete?

When trying to run the demo, the Playground returns error "InvalidAccessError: A parameter or an operation is not supported by the underlying object" and the button under the "Result" header opens a blank page.

What did you expect to see?

When using the demo, it seems like there should be an array of ASCII values. Instead, there is an error message in the Playground, and the demo under the "Result" header just opens a blank page.

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

No response

Do you have anything more you want to share?

I am using this page to learn JavaScript for web development, if I can help with this I'd like to! I just need some pointers on where to start, and I might need someone to help me walk through the code of the page.

MDN metadata

Page report details * Folder: `en-us/web/api/blob` * MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/Blob * GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/blob/index.md * Last commit: https://github.com/mdn/content/commit/84a9afd94f497d4173bde131731ef6bdf0b6135d * Document last modified: 2023-12-02T07:13:28.000Z
wbamberg commented 4 months ago

@caugner , this looks like a Playground regression? This worked in May 2023: https://web.archive.org/web/20230525042810/https://developer.mozilla.org/en-US/docs/Web/API/Blob#examples

caugner commented 4 months ago

@wbamberg Yes, it looks like a duplicate of https://github.com/mdn/yari/issues/9360.

I opened https://github.com/mdn/yari/pull/9801 to potentially fix this, but we discussed this internally and refrained from proceeding with that approach due to security concerns. We still want to fix this though. Let's move this issue over to yari.

mirunacurtean commented 3 months ago

Just an update from a cross browser perspective; the Playground console error is only showing in Firefox, while nothing is displayed in the Playground Console in Chrome or Safari when trying to to run the demo (however, we can look at the browser console and observe an error informing us that pop ups are not permitted)

Firefox image

Safari/ Chrome image

Note: also a duplicate of https://github.com/mdn/yari/issues/9956 and of https://github.com/mdn/yari/issues/9646