Embedded RapydScript test fails
See original GitHub issueWhen I try the test of embedded RapydScript shown below, I get errors in both Firefox and Chrome.
Firefox:
Error: Unexpected token punc <<:>>, expected punc <<(>> <embedded>:1:0
KL.CB DocumentNotifier.onLoadDocument exc: Unknown window tracer.js:22:0
Chrome:
Uncaught ReferenceError: ρσ_bool is not defined VM575:9, Object.defineProperties(ρσ_bool, {
-------------------------------
I added the statement "<meta charset="UTF-8">" to prevent other errors that occurred:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Test embedded RapydScript</title>
<script src="https://kovidgoyal.github.io/rapydscript/repl/rapydscript.js"></script>
<script>
var compiler = RapydScript.create_embedded_compiler()
var js = compiler.compile("def hellow_world:\n a='RapydScript is cool!'\n print(a)\n alert(a)")
window.onload = function() {
document.body.textContent = js
eval(js)
eval('hello_world()')
}
</script>
</head>
<body style="white-space:pre-wrap"></body>
</html>
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
ES5 Embedded Compiler? #28 - kovidgoyal/rapydscript-ng
Hi @kovidgoyal I want to create an app using cordova + embedded rs-ng, ... But note that the resulting compiler will error out...
Read more >Embedding Rapydscript - Google Groups
Hi! Coding Python with switching to coding JS - really painful. So, I tried Rapydscript (RS) and I like it very much! Unfortunately,...
Read more >Soundcloud embedded javascript error : Failed to execute ...
One fix for this error is to change the width of the <iframe> to px value rather than a % value, as the...
Read more >VPython Help - GlowScript
His tutorials use tools at trinket.io that embed writing and running Web VPython ... The VPython option is based on the RapydScript-NG Python-to-JavaScript ......
Read more >Embedded Framework Example - JavaScript SDK
That error message will be caused by the client ID not existing in that region. Here are some things to check: If there's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Kovid, you are amazingly responsive. Thank you!
It was indeed a bug in Chrome – I have committed a workaround. Incidentally the example for using the embedded compiler is in the readme.