Examples of callFunction()


Examples of com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction()

            else {
                thisValue = this;
            }
            for (int i = 0; i < nbExecutions; i++) {
                LOG.debug("Calling onreadystatechange handler for state " + state);
                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.");
            }
        }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction()

            if (context == null) {
                context = Context.getCurrentContext();
            }
            final Scriptable scope = loadHandler_.getParentScope();
            final JavaScriptEngine jsEngine = containingPage_.getWebClient().getJavaScriptEngine();
            jsEngine.callFunction(containingPage_, loadHandler_, context, scope, this, ArrayUtils.EMPTY_OBJECT_ARRAY);
        }
    }

    /**
     * Returns the event handler that fires on load.
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction()

            }
            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.");
        }
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction()

        if (!getWebClient().isJavaScriptEnabled()) {
            return new ScriptResult(null, this);
        }

        final JavaScriptEngine engine = getWebClient().getJavaScriptEngine();
        final Object result = engine.callFunction(this, function, thisObject, args, htmlElementScope);

        return new ScriptResult(result, getWebClient().getCurrentWindow().getEnclosedPage());
    }

    /** Various possible external JavaScript file loading results. */
 
View Full Code Here

Examples of com.sun.star.sheet.XFunctionAccess.callFunction()

    c.setTime (date);
   
    Object [] dateArgs = {new Integer(c.get (Calendar.YEAR)),
                          new Integer(c.get (Calendar.MONTH) + 1),
                          new Integer(c.get (Calendar.DAY_OF_MONTH))};
    double result = (Double)(fa.callFunction ("DATE", dateArgs));
    Object [] timeArgs = {new Integer(c.get (Calendar.HOUR_OF_DAY)),
                          new Integer(c.get (Calendar.MINUTE)),
                          new Integer(c.get (Calendar.SECOND))};
    result += (Double)(fa.callFunction ("TIME", timeArgs));
    myLog.debug ("result = " + result);
View Full Code Here

Examples of com.sun.star.sheet.XFunctionAccess.callFunction()

                          new Integer(c.get (Calendar.DAY_OF_MONTH))};
    double result = (Double)(fa.callFunction ("DATE", dateArgs));
    Object [] timeArgs = {new Integer(c.get (Calendar.HOUR_OF_DAY)),
                          new Integer(c.get (Calendar.MINUTE)),
                          new Integer(c.get (Calendar.SECOND))};
    result += (Double)(fa.callFunction ("TIME", timeArgs));
    myLog.debug ("result = " + result);
    return result;
  }

  /**
 
View Full Code Here

Examples of com.sun.star.sheet.XFunctionAccess.callFunction()

  public Date toDate (double val) throws ParseException, Exception
  {
    XFunctionAccess fa = getFunctionAccess();

    Object [] args = {new Double(val), "YYYY-MM-DD HH:MM:SS"};
    String text = (String)(fa.callFunction ("TEXT", args));

    if (myToDateSdf == null) {
      myToDateSdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    }
    Date d = myToDateSdf.parse (text);
View Full Code Here

Examples of com.sun.star.sheet.XFunctionAccess.callFunction()

    double val = 0.0;

    if (includeDate) {
      Object [] args = {new Integer(c.get (Calendar.YEAR)), new Integer(c.get (Calendar.MONTH) + 1), new Integer(c.get (Calendar.DAY_OF_MONTH))};
      myLog.debug("Date = {}-{}-{}", args);
      Double v = (Double)(fa.callFunction ("DATE", args));
      val = v.doubleValue ();
    }
    if (includeTime) {
      Object [] args = {new Integer(c.get (Calendar.HOUR)), new Integer(c.get (Calendar.MINUTE)), new Integer(c.get (Calendar.SECOND))};
      myLog.debug("Time = {}-{}-{}", args);
View Full Code Here

Examples of com.sun.star.sheet.XFunctionAccess.callFunction()

      val = v.doubleValue ();
    }
    if (includeTime) {
      Object [] args = {new Integer(c.get (Calendar.HOUR)), new Integer(c.get (Calendar.MINUTE)), new Integer(c.get (Calendar.SECOND))};
      myLog.debug("Time = {}-{}-{}", args);
      Double v = (Double)(fa.callFunction ("TIME", args));
      val += v.doubleValue ();
    }
    myLog.debug("return {}", val);
    return val;
  }
View Full Code Here

Examples of flash.tools.debugger.Session.callFunction()

    {
      return session.callConstructor(functionName, valueArgs);
    }
    else
    {
      return session.callFunction(thisObject, functionName, valueArgs);
    }
  }

  private boolean isXMLType(flash.tools.debugger.Value value)
  {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.