biofriction-wp-theme/node_modules/vm-browserify/example/run/entry.js

7 lines
185 B
JavaScript
Raw Permalink Normal View History

2021-10-26 14:18:09 +02:00
var vm = require('vm');
window.addEventListener('load', function () {
var res = vm.runInNewContext('a + 5', { a : 100 });
document.querySelector('#res').textContent = res;
});