@Override protected String getSourceCode(final Context cx) { return cx.decompileFunction(function, 2); } };
@Override protected String getSourceCode(final Context cx) { return cx.decompileFunction(function, 2); } };
@Override protected String getSourceCode(final Context cx) { return cx.decompileFunction(function, 2); } };
@Override protected String getSourceCode(final Context cx) { return cx.decompileFunction(function, 2); } };
@Override protected String getSourceCode(final Context cx) { return cx.decompileFunction(function, 2); } };
/** * Sets the state as specified and invokes the state change handler if one has been set. * @param state the new state * @param context the context within which the state change handler is to be invoked; * if {@code null}, the current thread's context is used */ private void setState(final int state, Context context) { state_ = state; if (stateChangeHandler_ != null && !openedMultipleTimes_) { final Scriptable scope = stateChangeHandler_.getParentScope(); final JavaScriptEngine jsEngine = (JavaScriptEngine) containingPage_.getWebClient().getJavaScriptEngine(); if (LOG.isDebugEnabled()) { LOG.debug("Calling onreadystatechange handler for state " + state); } final Object[] params = ArrayUtils.EMPTY_OBJECT_ARRAY; jsEngine.callFunction(containingPage_, stateChangeHandler_, scope, this, params); if (LOG.isDebugEnabled()) { if (context == null) { context = Context.getCurrentContext(); } LOG.debug("onreadystatechange handler: " + context.decompileFunction(stateChangeHandler_, 4)); LOG.debug("Calling onreadystatechange handler for state " + state + ". Done."); } } }
/** * Sets the state as specified and invokes the state change handler if one has been set. * @param state the new state * @param context the context within which the state change handler is to be invoked; * if {@code null}, the current thread's context is used */ private void setState(final int state, Context context) { state_ = state; if (stateChangeHandler_ != null && !openedMultipleTimes_) { final Scriptable scope = stateChangeHandler_.getParentScope(); final JavaScriptEngine jsEngine = (JavaScriptEngine) containingPage_.getWebClient().getJavaScriptEngine(); if (LOG.isDebugEnabled()) { LOG.debug("Calling onreadystatechange handler for state " + state); } final Object[] params = ArrayUtils.EMPTY_OBJECT_ARRAY; jsEngine.callFunction(containingPage_, stateChangeHandler_, scope, this, params); if (LOG.isDebugEnabled()) { if (context == null) { context = Context.getCurrentContext(); } LOG.debug("onreadystatechange handler: " + context.decompileFunction(stateChangeHandler_, 4)); LOG.debug("Calling onreadystatechange handler for state " + state + ". Done."); } } }
/** * Invokes the onerror handler if one has been set. * @param context the context within which the onerror handler is to be invoked; * if {@code null}, the current thread's context is used. */ private void processError(Context context) { if (errorHandler_ != null) { final Scriptable scope = errorHandler_.getParentScope(); final JavaScriptEngine jsEngine = (JavaScriptEngine) containingPage_.getWebClient().getJavaScriptEngine(); final Object[] params = new Event[] {new ProgressEvent(this, Event.TYPE_ERROR)}; if (LOG.isDebugEnabled()) { LOG.debug("Calling onerror handler"); } jsEngine.callFunction(containingPage_, errorHandler_, this, scope, params); if (LOG.isDebugEnabled()) { if (context == null) { context = Context.getCurrentContext(); } LOG.debug("onerror handler: " + context.decompileFunction(errorHandler_, 4)); LOG.debug("Calling onerror handler done."); } } }
/** * Invokes the onerror handler if one has been set. * @param context the context within which the onerror handler is to be invoked; * if {@code null}, the current thread's context is used. */ private void processError(Context context) { if (errorHandler_ != null) { final Scriptable scope = errorHandler_.getParentScope(); final JavaScriptEngine jsEngine = (JavaScriptEngine) containingPage_.getWebClient().getJavaScriptEngine(); final Object[] params = new Event[] {new ProgressEvent(this, Event.TYPE_ERROR)}; if (LOG.isDebugEnabled()) { LOG.debug("Calling onerror handler"); } jsEngine.callFunction(containingPage_, errorHandler_, this, scope, params); if (LOG.isDebugEnabled()) { if (context == null) { context = Context.getCurrentContext(); } LOG.debug("onerror handler: " + context.decompileFunction(errorHandler_, 4)); LOG.debug("Calling onerror handler done."); } } }
/** * Invokes the onerror handler if one has been set. * @param context the context within which the onerror handler is to be invoked; * if <tt>null</tt>, the current thread's context is used. */ private void processError(Context context) { if (errorHandler_ != null && !getBrowserVersion().isIE()) { if (context == null) { context = Context.getCurrentContext(); } final Scriptable scope = errorHandler_.getParentScope(); final JavaScriptEngine jsEngine = containingPage_.getWebClient().getJavaScriptEngine(); LOG.debug("Calling onerror handler"); jsEngine.callFunction(containingPage_, errorHandler_, context, this, scope, ArrayUtils.EMPTY_OBJECT_ARRAY); LOG.debug("onerror handler: " + context.decompileFunction(errorHandler_, 4)); LOG.debug("Calling onerror handler done."); } }
/** * Invokes the onerror handler if one has been set. * @param context the context within which the onerror handler is to be invoked; * if <tt>null</tt>, the current thread's context is used. */ private void processError(Context context) { if (errorHandler_ != null && !getBrowserVersion().isIE()) { if (context == null) { context = Context.getCurrentContext(); } final Scriptable scope = errorHandler_.getParentScope(); final JavaScriptEngine jsEngine = containingPage_.getWebClient().getJavaScriptEngine(); LOG.debug("Calling onerror handler"); jsEngine.callFunction(containingPage_, errorHandler_, context, this, scope, ArrayUtils.EMPTY_OBJECT_ARRAY); LOG.debug("onerror handler: " + context.decompileFunction(errorHandler_, 4)); LOG.debug("Calling onerror handler done."); } }
/** * Invokes the onerror handler if one has been set. * @param context the context within which the onerror handler is to be invoked; * if <tt>null</tt>, the current thread's context is used. */ private void processError(Context context) { if (errorHandler_ != null && !getBrowserVersion().isIE()) { if (context == null) { context = Context.getCurrentContext(); } final Scriptable scope = errorHandler_.getParentScope(); final JavaScriptEngine jsEngine = containingPage_.getWebClient().getJavaScriptEngine(); LOG.debug("Calling onerror handler"); jsEngine.callFunction(containingPage_, errorHandler_, context, this, scope, ArrayUtils.EMPTY_OBJECT_ARRAY); LOG.debug("onerror handler: " + context.decompileFunction(errorHandler_, 4)); LOG.debug("Calling onerror handler done."); } }
jsEngine.callFunction(containingPage_, stateChangeHandler_, context, scope, thisValue, ArrayUtils.EMPTY_OBJECT_ARRAY); LOG.debug("onreadystatechange handler: " + context.decompileFunction(stateChangeHandler_, 4)); LOG.debug("Calling onreadystatechange handler for state " + state + ". Done.");
jsEngine.callFunction(containingPage_, stateChangeHandler_, context, scope, thisValue, ArrayUtils.EMPTY_OBJECT_ARRAY); LOG.debug("onreadystatechange handler: " + context.decompileFunction(stateChangeHandler_, 4)); LOG.debug("Calling onreadystatechange handler for state " + state + ". Done.");
jsEngine.callFunction(containingPage_, stateChangeHandler_, context, scope, thisValue, ArrayUtils.EMPTY_OBJECT_ARRAY); LOG.debug("onreadystatechange handler: " + context.decompileFunction(stateChangeHandler_, 4)); LOG.debug("Calling onreadystatechange handler for state " + state + ". Done.");
context = Context.getCurrentContext(); LOG.debug("onreadystatechange handler: " + context.decompileFunction(stateChangeHandler_, 4)); LOG.debug("Calling onreadystatechange handler for state " + state + ". Done.");
context = Context.getCurrentContext(); LOG.debug("onreadystatechange handler: " + context.decompileFunction(stateChangeHandler_, 4));