Use the Twitch JSON API feedback please

Use the Twitch JSON API feedback please
0

Use the Twitch JSON API

Please take a look to my solution. This challenge was a bit difficult because I did not find any usable project… Even the example page don’t work.

Codepen
Live page

I have also several error on console:

  • on live page:

Failed to load ‘’ as a plugin, because the frame into which the plugin is loading is sandboxed.

  • If I click on twitchTV icon (right-bottom) I get the same error like on the example page:

Uncaught DOMException: Failed to set the ‘domain’ property on ‘Document’: Assignment is forbidden for sandboxed iframes.

but on localhost I don’t get the above error. The twitchTV site open on new tab as well.

  • on localhost:

GET chrome-extension://invalid/ net::ERR_FAILED

I have not idea how to fix these errors… :frowning: , but the app is running.
You can add new user to the list, or delete anyone or filter online/offline and also is it responsive… Try on mobile too or resize the window.

-------------------------------------- Updated -------------------------------------------------
I found a solutions to fix the second error: Assignment is forbidden for sandboxed iframes.
Ones the iframe element rendered have to add an attribute to the iframe:

document.getElementsByTagName("iframe")[0].setAttribute("sandbox", "allow-scripts allow-top-navigation");

Now if click on twitchTV icon it’s open the channel in new tab…

Left of more two issue…