Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createCachedData is not implemented #25

Open
entrptaher opened this issue Sep 10, 2019 · 1 comment
Open

createCachedData is not implemented #25

entrptaher opened this issue Sep 10, 2019 · 1 comment

Comments

@entrptaher
Copy link

entrptaher commented Sep 10, 2019

const vm = require("vm");

let script = new vm.Script("console.log('hello world')", { produceCachedData: true });

console.log(script.createCachedData());

This fails because it's not implemented yet. We can run bytecode inside browser if this is implemented.

This is implemented here on node source, https://github.com/nodejs/node/blob/0e715dea84d67a24624516c730aa71ed04971727/src/node_contextify.cc#L787

Is it possible to implement this on vm-browserify?

@goto-bus-stop
Copy link
Member

I'm not aware of any way to do this in the browser, no. There is no cross platform API for bytecode caches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants