问题描述
找不到关于此功能的任何开发者信息。我只知道建议使用这个 $ entry
函数将JSNI JavaScript调用包装到Java方法中。我发现它捕获异常,所以Java代码可以处理它们。如果你想确切地知道发生了什么,看看 com。它是一切吗?
这个函数(至少在GWT 2.2.0 )主要调用 entry0(Object jsFunction,Object thisObj,Object arguments)
,它执行以下操作:
Scheduler.scheduleEntry()
GWT.getUncaughtExceptionHandler()
。
Scheduler.scheduleFinally()
Cannot find any developer information about this function. I just know that it's suggested to wrap JSNI JavaScript calls to Java methods with this $entry
function. I found that it catches exceptions so Java code could handle them. Is it all it does?
If you want to know exactly what happens, look into com.google.gwt.core.client.impl.Impl.entry(JavaScriptObject jsFunction)
.
This function (at least in GWT 2.2.0) mainly calls entry0(Object jsFunction, Object thisObj, Object arguments)
, which does the following:
- First, it flushes anything that has been scheduled by
Scheduler.scheduleEntry()
- Then it makes sure to execute the jsFunction in a try block, to forward Exceptions to
GWT.getUncaughtExceptionHandler()
, if there is such a handler. - Finally, it flushes anything that has been scheduled by
Scheduler.scheduleFinally()
这篇关于GWT 2.x $输入功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!