3 ms·
so this is basically eval('var input = inputElement.innerText;' + jsElement.innerText)
by high_byte 6y ago
so this is basically eval('var input = inputElement.innerText;' + jsElement.innerText)
- awulf 6y agoBasically, yes. In practice, there's a bit more to it. The user code is wrapped into an "async function(input)" (so you can use async/await) and run inside a worker inside a sandboxed iframe (for security reasons and for being able to stop the execution). There's also some additional code for catching errors and parsing the error stack.