/** * Returns the value of the named property. Will return null if the property does not exist. **/ public Object get( String propertyName ) { if (propertyName.equals( "name" )) { return getName(); } else if (propertyName.equalsIgnoreCase( "top" )) { return _window.getFrameContents( WebRequest.TOP_FRAME ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "parent" )) { return _window.getParentFrameContents( _frame ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "opener" )) { return getFrameName().equals( WebRequest.TOP_FRAME ) ? getScriptable( _window.getOpener() ) : null; } else if (propertyName.equalsIgnoreCase( "closed" )) { return (getFrameName().equals( WebRequest.TOP_FRAME ) && _window.isClosed()) ? Boolean.TRUE : Boolean.FALSE; } else { try { return getSubframeContents( propertyName ).getScriptableObject(); } catch (NoSuchFrameException e) { return super.get( propertyName ); } } }
/** * Returns the value of the named property. Will return null if the property does not exist. **/ public Object get( String propertyName ) { if (propertyName.equals( "name" )) { return getName(); } else if (propertyName.equalsIgnoreCase( "top" )) { return _window.getFrameContents( WebRequest.TOP_FRAME ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "parent" )) { return _window.getParentFrameContents( _frame ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "opener" )) { return getFrameName().equals( WebRequest.TOP_FRAME ) ? getScriptable( _window.getOpener() ) : null; } else if (propertyName.equalsIgnoreCase( "closed" )) { return (getFrameName().equals( WebRequest.TOP_FRAME ) && _window.isClosed()) ? Boolean.TRUE : Boolean.FALSE; } else { try { return getSubframeContents( propertyName ).getScriptableObject(); } catch (NoSuchFrameException e) { return super.get( propertyName ); } } }
/** * Returns the value of the named property. Will return null if the property does not exist. **/ public Object get( String propertyName ) { if (propertyName.equals( "name" )) { return getName(); } else if (propertyName.equalsIgnoreCase( "top" )) { return _window.getFrameContents( WebRequest.TOP_FRAME ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "parent" )) { return _window.getParentFrameContents( _frame ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "opener" )) { return getFrameName().equals( WebRequest.TOP_FRAME ) ? getScriptable( _window.getOpener() ) : null; } else if (propertyName.equalsIgnoreCase( "closed" )) { return (getFrameName().equals( WebRequest.TOP_FRAME ) && _window.isClosed()) ? Boolean.TRUE : Boolean.FALSE; } else { try { return getSubframeContents( propertyName ).getScriptableObject(); } catch (NoSuchFrameException e) { return super.get( propertyName ); } } }