-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathJavaScriptExecutorHandler.js
More file actions
37 lines (30 loc) · 1.04 KB
/
JavaScriptExecutorHandler.js
File metadata and controls
37 lines (30 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*******************************************************************************
* Copyright (c) 2012, 2014 EclipseSource and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* EclipseSource - initial API and implementation
* Kyle Smith - Add evaluate method
******************************************************************************/
rwt.remote.HandlerRegistry.add( "rwt.client.JavaScriptExecutor", {
factory : function() {
return rwt.client.JavaScriptExecutor.getInstance();
},
service : true,
destructor : rwt.util.Functions.returnTrue,
methods : [
"execute",
"evaluate"
],
methodHandler : {
"execute" : function( object, args ) {
object.execute( args.content );
},
"evaluate" : function( object, args ) {
object.evaluate( args.futureId, args.content );
}
}
} );