1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/vm-browserify/example/run/entry.js

7 lines
185 B
JavaScript
Raw Normal View History

2023-12-18 13:12:25 +08:00
var vm = require('vm');
2024-01-16 21:26:16 +08:00
window.addEventListener('load', function () {
2023-12-18 13:12:25 +08:00
var res = vm.runInNewContext('a + 5', { a : 100 });
2024-01-16 21:26:16 +08:00
document.querySelector('#res').textContent = res;
2023-12-18 13:12:25 +08:00
});