Package net.sourceforge.htmlunit.corejs.javascript

Examples of net.sourceforge.htmlunit.corejs.javascript.ScriptableObject


    /*
     * 1. lookup functions by name. 2. Find context and scope. 3. Convert
     * thisObject to ScriptableObject 4. Convert args 5. Get return value
     */
    Context jsContext = Context.getCurrentContext();
    ScriptableObject jsThis;
    if (thisObj.getType() == ValueType.NULL) {
      jsThis = window;
    } else {
      jsThis = (ScriptableObject) makeJsvalFromValue(jsContext, thisObj);
    }
View Full Code Here


      if (value instanceof ScriptableObject) {
        /*
         * HACK: check for native types like NativeString. NativeString is
         * package-protected. What other types do we need to check?
         */
        ScriptableObject scriptableValue = (ScriptableObject) value;
        String className = scriptableValue.getClassName();
        if (className.equals("String")) {
          return new Value(scriptableValue.toString());
        }
      }
      Integer refId = jsObjectToRef.get(value);
      if (refId == null) {
        refId = nextRefId++;
View Full Code Here

    /*
     * 1. lookup functions by name. 2. Find context and scope. 3. Convert
     * thisObject to ScriptableObject 4. Convert args 5. Get return value
     */
    Context jsContext = Context.getCurrentContext();
    ScriptableObject jsThis;
    if (thisObj.getType() == ValueType.NULL) {
      jsThis = window;
    } else {
      jsThis = (ScriptableObject) makeJsvalFromValue(jsContext, thisObj);
    }
View Full Code Here

      if (value instanceof ScriptableObject) {
        /*
         * HACK: check for native types like NativeString. NativeString is
         * package-protected. What other types do we need to check?
         */
        ScriptableObject scriptableValue = (ScriptableObject) value;
        String className = scriptableValue.getClassName();
        if (className.equals("String")) {
          return new Value(scriptableValue.toString());
        }
      }
      Integer refId = jsObjectToRef.get(value);
      if (refId == null) {
        refId = nextRefId++;
View Full Code Here

    /*
     * 1. lookup functions by name. 2. Find context and scope. 3. Convert
     * thisObject to ScriptableObject 4. Convert args 5. Get return value
     */
    Context jsContext = Context.getCurrentContext();
    ScriptableObject jsThis = null;
    if (thisObj.getType() == ValueType.NULL) {
      jsThis = window;
    } else {
      Object obj = makeJsvalFromValue(jsContext, thisObj);
      if (obj instanceof ScriptableObject) {
View Full Code Here

      if (value instanceof ScriptableObject) {
        /*
         * HACK: check for native types like NativeString. NativeString is
         * package-protected. What other types do we need to check?
         */
        ScriptableObject scriptableValue = (ScriptableObject) value;
        String className = scriptableValue.getClassName();
        if (className.equals("String")) {
          return new Value(scriptableValue.toString());
        }
      }
      Integer refId = jsObjectToRef.get(value);
      if (refId == null) {
        refId = nextRefId++;
View Full Code Here

  @Override
  public Object execute(final HtmlPage htmlPage, final String sourceCode,
      final String sourceName, final int startLine)
        throws JavaScriptException, JavaScriptEngineException {

    final ScriptableObject scope = (ScriptableObject)htmlPage
        .getEnclosingWindow().getScriptObject();

    this.initializeScope(scope);
    this.loadScopeResources(scope);
View Full Code Here

    /*
     * 1. lookup functions by name. 2. Find context and scope. 3. Convert
     * thisObject to ScriptableObject 4. Convert args 5. Get return value
     */
    Context jsContext = Context.getCurrentContext();
    ScriptableObject jsThis = null;
    if (thisObj.getType() == ValueType.NULL) {
      jsThis = window;
    } else {
      Object obj = makeJsvalFromValue(jsContext, thisObj);
      if (obj instanceof ScriptableObject) {
View Full Code Here

      if (value instanceof ScriptableObject) {
        /*
         * HACK: check for native types like NativeString. NativeString is
         * package-protected. What other types do we need to check?
         */
        ScriptableObject scriptableValue = (ScriptableObject) value;
        String className = scriptableValue.getClassName();
        if (className.equals("String")) {
          return new Value(scriptableValue.toString());
        }
      }
      Integer refId = jsObjectToRef.get(value);
      if (refId == null) {
        refId = nextRefId++;
View Full Code Here

                }

                // now looks at the visibility of the frame window
                final BaseFrame frameElement = fw.getFrameElement();
                if (frameElement.isDisplayed()) {
                    final ScriptableObject scriptableObject = frameElement.getScriptObject();
                    final ComputedCSSStyleDeclaration style = ((HTMLElement) scriptableObject).jsxGet_currentStyle();
                    use = (style.getCalculatedWidth(false, false) != 0)
                        && (style.getCalculatedHeight(false, false) != 0);
                }
            }
View Full Code Here

TOP

Related Classes of net.sourceforge.htmlunit.corejs.javascript.ScriptableObject

Copyright © 2018 www.massapicom. 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.