@Override protected Function compileFunction(final Scriptable scope, String source, final Evaluator compiler, final ErrorReporter compilationErrorReporter, final String sourceName, final int lineno, final Object securityDomain) { if (deminifyFunctionCode_) { final Function f = super.compileFunction(scope, source, compiler, compilationErrorReporter, sourceName, lineno, securityDomain); source = decompileFunction(f, 4).trim().replace("\n ", "\n"); } return super.compileFunction(scope, source, compiler, compilationErrorReporter, sourceName, lineno, securityDomain); } }
@Override protected Function compileFunction(final Scriptable scope, String source, final Evaluator compiler, final ErrorReporter compilationErrorReporter, final String sourceName, final int lineno, final Object securityDomain) { if (deminifyFunctionCode_) { final Function f = super.compileFunction(scope, source, compiler, compilationErrorReporter, sourceName, lineno, securityDomain); source = decompileFunction(f, 4).trim().replace("\n ", "\n"); } return super.compileFunction(scope, source, compiler, compilationErrorReporter, sourceName, lineno, securityDomain); } }
final Function compileFunction(Scriptable scope, String source, Evaluator compiler, ErrorReporter compilationErrorReporter, String sourceName, int lineno, Object securityDomain) { try { return (Function) compileImpl(scope, null, source, sourceName, lineno, securityDomain, true, compiler, compilationErrorReporter); } catch (IOException ioe) { // Should never happen because we just made the reader // from a String throw new RuntimeException(); } }
final String source = "function(){" + value + "}"; method.invoke(this, new Object[] { Context.getCurrentContext().compileFunction(getWindow(), source, "", 0, null)});
final String source = "function(){" + value + "}"; method.invoke(this, new Object[] { Context.getCurrentContext().compileFunction(getWindow(), source, "", 0, null)});
final String source = "function(){" + value + "}"; method.invoke(this, new Object[] { Context.getCurrentContext().compileFunction(getWindow(), source, "", 0, null)});
return cx.compileFunction(global, source, evaluator, reporter, sourceURI, 1, null);
/** * {@inheritDoc} */ @Override public Object call(final Context cx, final Scriptable scope, final Scriptable thisObj, final Object[] args) throws JavaScriptException { // the js object to which this event is attached has to be the scope final SimpleScriptable jsObj = node_.getScriptableObject(); // compile "just in time" if (realFunction_ == null) { realFunction_ = cx.compileFunction(jsObj, jsSnippet_, eventName_ + " event for " + node_ + " in " + node_.getPage().getUrl(), 0, null); realFunction_.setParentScope(jsObj); } return realFunction_.call(cx, scope, thisObj, args); }
/** * {@inheritDoc} */ @Override public Object call(final Context cx, final Scriptable scope, final Scriptable thisObj, final Object[] args) throws JavaScriptException { // the js object to which this event is attached has to be the scope final SimpleScriptable jsObj = node_.getScriptableObject(); // compile "just in time" if (realFunction_ == null) { realFunction_ = cx.compileFunction(jsObj, jsSnippet_, eventName_ + " event for " + node_ + " in " + node_.getPage().getUrl(), 0, null); realFunction_.setParentScope(jsObj); } return realFunction_.call(cx, scope, thisObj, args); }
/** * {@inheritDoc} */ @Override public Object call(final Context cx, final Scriptable scope, final Scriptable thisObj, final Object[] args) throws JavaScriptException { // the js object to which this event is attached has to be the scope final SimpleScriptable jsObj = (SimpleScriptable) node_.getScriptObject(); // compile "just in time" if (realFunction_ == null) { realFunction_ = cx.compileFunction(jsObj, jsSnippet_, eventName_ + " event for " + node_ + " in " + node_.getPage().getWebResponse().getRequestSettings().getUrl(), 0, null); } final Object result = realFunction_.call(cx, scope, thisObj, args); return result; }
/** * {@inheritDoc} */ @Override public Object call(final Context cx, final Scriptable scope, final Scriptable thisObj, final Object[] args) throws JavaScriptException { // the js object to which this event is attached has to be the scope final SimpleScriptable jsObj = (SimpleScriptable) node_.getScriptObject(); // compile "just in time" if (realFunction_ == null) { realFunction_ = cx.compileFunction(jsObj, jsSnippet_, eventName_ + " event for " + node_ + " in " + node_.getPage().getWebResponse().getRequestSettings().getUrl(), 0, null); } final Object result = realFunction_.call(cx, scope, thisObj, args); return result; }
/** * {@inheritDoc} */ @Override public Object call(final Context cx, final Scriptable scope, final Scriptable thisObj, final Object[] args) throws JavaScriptException { // the js object to which this event is attached has to be the scope final SimpleScriptable jsObj = (SimpleScriptable) node_.getScriptObject(); // compile "just in time" if (realFunction_ == null) { realFunction_ = cx.compileFunction(jsObj, jsSnippet_, eventName_ + " event for " + node_ + " in " + node_.getPage().getWebResponse().getRequestSettings().getUrl(), 0, null); } final Object result = realFunction_.call(cx, scope, thisObj, args); return result; }