This repository has moved to https://github.com/LivelyKernel/lively.next/tree/master/lively.vm
livelykernel / lively.vm Goto Github PK
View Code? Open in Web Editor NEWControlled JavaScript code execution and instrumentation.
Controlled JavaScript code execution and instrumentation.
This repository has moved to https://github.com/LivelyKernel/lively.next/tree/master/lively.vm
I know this is bad code but it should run anyway, or shouldn't it?
var a = prompt('Hello', 'world');
// -> Error TypeError: Illegal invocation
// vs.
var b = window.prompt('Hello', 'world')
The following code cannot be executed:
class Foo {
constructor() {
if (new.target === Foo) {
throw new TypeError('Cannot construct Foo directly');
}
}
}
And produces the following error
lively.vm evalCodeTransform not working: SyntaxError: workspace://1: Unexpected token (8:28)
6 | key: Symbol.for('lively-instance-initialize'),
7 | value: function Foo_initialize_() {
> 8 | if ([object Object].[object Object] === __lvVarRecorder.Foo) {
| ^
9 | throw new TypeError('Cannot construct Foo directly');
10 | }
11 | }
at Parser.pp.raise (https://livelykernel.github.io/lively4-core/src/external/babel-browser.js:65149:13)
at Parser.pp.unexpected (https://livelykernel.github.io/lively4-core/src/external/babel-browser.js:66379:8)
at Parser.pp.expect (https://livelykernel.github.io/lively4-core/src/external/babel-browser.js:66373:33)
at Parser.pp.parseExprList (https://livelykernel.github.io/lively4-core/src/external/babel-browser.js:64962:12)
at Parser.pp.parseExprAtom (https://livelykernel.github.io/lively4-core/src/external/babel-browser.js:64564:28)
at Parser.eval [as parseExprAtom] (https://livelykernel.github.io/lively4-core/src/external/babel-browser.js:67755:22)
at Parser.pp.parseExprSubscripts (https://livelykernel.github.io/lively4-core/src/external/babel-browser.js:64413:19)
at Parser.pp.parseMaybeUnary (https://livelykernel.github.io/lively4-core/src/external/babel-browser.js:64394:19)
at Parser.pp.parseExprOps (https://livelykernel.github.io/lively4-core/src/external/babel-browser.js:64340:19)
at Parser.pp.parseMaybeConditional (https://livelykernel.github.io/lively4-core/src/external/babel-browser.js:64322:19)
original error report: LivelyKernel/lively4-core#66
from @merryman: Something strange I encountered this morning: static members of classes are not inherited? Maybe I missed something but I was eventually forced to move back to instance methods and create a singleton instead….
Our class implementation now lives to equal parts in lively.ast and here and fits in neither. Extract into a lively.classes package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.