U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » U++ Developers corner » v8 JavaScript in U++
v8 JavaScript in U++ [message #32321] Mon, 09 May 2011 13:06 Go to previous message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

Hello All,

v8 JavaScript can be integrated in U++.
I use shared library of v8 because it take less space.

I have attached a simple example with screen shot.
index.php?t=getfile&id=3233&private=0

To run this example need to have a builded v8 3.3.4.0, add in include folders v8.lib (for windows) and run.

To run a simple JavaScript code is simple:
		V8JS::Locker locker;
		V8JS::HandleValue result = curr_V8JS.Execute(CodeForExecution.GetData());
		if(curr_V8JS.IsError()){
			PromptOK(DeQtf(Format("JavaScriptError: %s", curr_V8JS.GetLastError())));
		}


I added some functions(system.write(), alert(), ...) and handlers(onexit());

Any comment are welcome.
  • Attachment: v8_test.PNG
    (Size: 20.14KB, Downloaded 1395 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TheIde new look and new features
Next Topic: MVC example
Goto Forum:
  


Current Time: Sun Apr 26 16:13:35 GMT+2 2026

Total time taken to generate the page: 0.00813 seconds