Hi all, I'm new to V8 and I'm trying to embed v8 on a file definition 
similar to html where you have a <script> tag and some onmousein,onclick, 
etc event handlers. The file can be something like this:
<rect onmousein="foo(evt);alert(evt)"
<script>
function foo(evt)
{
  alert(evt.target);
}
<script>
So, what's the best approach to handle this kind of "shared" scripts on v8?
If I create a new v8::Script per <script> tag and event, are script 
definitions shared? Because running the first script (the event handler) 
gives ReferenceErrors: foo is not defined
I tried to make the v8::Script on the <script> tag persistent, but still no 
luck.

Should I use one context per script string? and then, how to use the 
definitions from one script in the other?
How is this kind of situation handled with v8?

Regards

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to