-
Notifications
You must be signed in to change notification settings - Fork 204
Closed
Description
My first real problem! I'm trying to do something similar to the following javascript in V8Js:
var f = function() { return "foo"; }
f.bar = "baz";
console.log(f.bar);
// bazSo I've got the following:
$v8 = new V8Js();
$f = $v8->executeString('(function() { return "foo"; })');
$f->bar = "baz"; // doesn't complain, but...
$v8->f = $f;
$v8->executeString('print(PHP.f.bar)');
// undefinedWell OK, it's a kind of crazy thing to want to do. But I've got PHP helpers being called from handlebars.js. They're passed JS functions, modify and then return them to the JS, which is expecting properties to be set. Any way around this?
Metadata
Metadata
Assignees
Labels
No labels