question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Embedded RapydScript test fails

See original GitHub issue
When 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:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
BruceSherwoodcommented, May 18, 2016

Kovid, you are amazingly responsive. Thank you!

0reactions
kovidgoyalcommented, May 18, 2016

It was indeed a bug in Chrome – I have committed a workaround. Incidentally the example for using the embedded compiler is in the readme.

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found