Microsoft MakeCode

Simulator Embed Code

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

Any suggestions

It seems to work here: . 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 (it’s not complicated my code ) and the embed code worked. I must be doing something wrong with the blocks at 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

This is mine.

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!!