Microsoft MakeCode

Simulator Embed Code

Have been trying out the embed code using w3schools.com. Code and editor embed works but the simulator embed just shows loading…

Any suggestions

It seems to work here: https://jsfiddle.net/6b82e0ac/ . What did you try out?

Yes I tried your embed example on w3schools and it works mine still doesn’t. I then tried my embed code on the jsfiddle site and it still didn’t work. I then recreated it on maker.makecode.com (it’s not complicated my code ) and the embed code worked. I must be doing something wrong with the blocks at makecode.adafruit.com as I still can’t get the embed code to work.

which editor you are using?

I am on a Mac so am using the web interface only at makecode.adafruit and maker.makecode. Then testing the embed. Have tried this with chrome and safari.
This is your embed code https://www.w3schools.com/code/tryit.asp?filename=G56U86YZ3TR0

This is mine.
https://www.w3schools.com/code/tryit.asp?filename=G56UAHY8C5PT

This is the code block I am looking at.

In Edge Dev (Chromium-based), I’m getting a JS error on line 128:

Uncaught TypeError: Cannot read property 'getAttribute' of null

128        var code = window.frameElement.getAttribute('data-code')

This is a known bug tracked here

There is already a fix in place for it on microbit, maker, and arcade, but the bug will persist in adafruit until the newest version of pxt is updated on that editor.

1 Like

Thanks a lot!!