Any help with the situation would be appreciated, as other blocks written into a static javascript file have worked fine (These use JCanvas to let users draw shapes) whereas the exact same code written into a static file throws the same error as the generated one. The PHP file itself isn't particularly elegant or well optimised at present, but it outputs code that looks like it should be correct.
This is where i'm hosting the tests: apps.engimatiworld.org.uk/VPE/
[It also has some other custom blocks, and some instructions explaining the basics as an example]
This line in the frame page;
<script type="text/javascript" src="blockly/language/en/server.php"></script>
...And almost as soon as I posted this, I noticed that I had forgotten to capitalise the "s" in Javascript. After changing Blockly.Javascript to Blockly.JavaScript it works quite well, although there are still issues with actually getting a return value from the blocks. That ends several hours of hair-pulling frustration though, so I hope this can help other people that make similar mistakes with capitalisation.