TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Evaluating JavaScript in the browser for a low code product

19 pointsby arey_abhishekover 4 years ago

6 comments

tonyhbover 4 years ago
Fairly certain you don&#x27;t want to be throwing `eval` in your code.<p>I&#x27;m also building a workflow engine on the side, but don&#x27;t want to see you run into security issues :)<p>Look into the realms TC39 proposal, the SES TC39 proposal, or running (no joke) a lightweight ES6 environment in webassembly to eval your code.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposal-realms&#x2F;#ecmascript-spec-proposal-for-realms-api" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposal-realms&#x2F;#ecmascript-spec-pro...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposal-ses" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposal-ses</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;justjake&#x2F;quickjs-emscripten" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;justjake&#x2F;quickjs-emscripten</a>
评论 #25917792 未加载
评论 #25919582 未加载
评论 #25922927 未加载
4lejandritoover 4 years ago
Nice work!<p>This reminded me to a series of posts by Figma in which they described how their JS plugin system works [1].<p>I remember there were plenty of security reasons why eval was not the best way to go. I wonder if you guys took this into account?<p>[1] <a href="https:&#x2F;&#x2F;www.figma.com&#x2F;blog&#x2F;how-we-built-the-figma-plugin-system&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.figma.com&#x2F;blog&#x2F;how-we-built-the-figma-plugin-sys...</a>
评论 #25919694 未加载
ficklepickleover 4 years ago
I love the idea of web workers. I struggle to find a use case that isn&#x27;t limited by serialization&#x2F;deserialization.<p>AFAIK, workers are strings in and strings out. Often serialization is the most expensive operation, so adding additional serialization&#x2F;deserialization steps can decrease performance overall.<p>The only use case I can imagine that would really benefit is computation-heavy with minimal input&#x2F;output.<p>Until there is safe shared memory (please correct me if I&#x27;m wrong) I don&#x27;t see many compelling use cases for web workers.
zubairqover 4 years ago
Nice to read. I wrote a JS evaluator for a low code product and the whole thing feels quite natural to use JS as the scripting language for a low code product. Well done!
bergieover 4 years ago
JavaScript in browser can be a nice sandbox for untrusted or semi-trusted code. We used that for a sort of AWS Lambda like thing some years ago<p><a href="https:&#x2F;&#x2F;github.com&#x2F;flowhub&#x2F;jsjob" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;flowhub&#x2F;jsjob</a>
Edmondover 4 years ago
looks nice, similar to retool.