Bladeren bron

Add utility method to run a native JS function

tags/gwtquery-project-1.5-beta1
Manolo Carrasco 9 jaren geleden
bovenliggende
commit
bd4a583480
1 gewijzigde bestanden met toevoegingen van 8 en 0 verwijderingen
  1. 8
    0
      gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java

+ 8
- 0
gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java Bestand weergeven

@@ -228,6 +228,14 @@ public class JsUtils {
}
}

/**
* Execute a native javascript function.
*/
public static <T> T exec(JavaScriptObject jsFunction, Object... args) {
assert isFunction(jsFunction);
return jsni(jsFunction, "call", jsFunction, args);
}

/**
* Assign a function to a property of the window object.
*/

Laden…
Annuleren
Opslaan