/** * 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 ); } } }
/** * initialize JavaScript for the given ScriptEngine * @parent - the Script Engine to use * @scriptable - the scriptable object to do the initialization for */ void initialize( JavaScriptEngine parent, ScriptableDelegate scriptable ) throws JavaScriptException, NotAFunctionException, PropertyException, SAXException { super.initialize( parent, scriptable ); _location = (Location) Context.getCurrentContext().newObject( this, "Location" ); _location.initialize(this, ((WebResponse.Scriptable) scriptable).getURL() ); _navigator = (Navigator) Context.getCurrentContext().newObject( this, "Navigator" ); _navigator.setClientProperties( getDelegate().getClientProperties() ); _screen = (Screen) Context.getCurrentContext().newObject( this, "Screen" ); _screen.setClientProperties( getDelegate().getClientProperties() ); }
public ScriptingHandler createJavascriptScriptingHandler() { return new Scriptable(); }
public boolean jsFunction_confirm( String message ) { return getDelegate().getConfirmationResponse( message ); }
HTMLPage.Scriptable getDocumentScriptable() { return getScriptableObject().getDocument(); }
/** * initialize JavaScript for the given ScriptEngine * @parent - the Script Engine to use * @scriptable - the scriptable object to do the initialization for */ void initialize( JavaScriptEngine parent, ScriptableDelegate scriptable ) throws JavaScriptException, NotAFunctionException, PropertyException, SAXException { super.initialize( parent, scriptable ); _location = (Location) Context.getCurrentContext().newObject( this, "Location" ); _location.initialize(this, ((WebResponse.Scriptable) scriptable).getURL() ); _navigator = (Navigator) Context.getCurrentContext().newObject( this, "Navigator" ); _navigator.setClientProperties( getDelegate().getClientProperties() ); _screen = (Screen) Context.getCurrentContext().newObject( this, "Screen" ); _screen.setClientProperties( getDelegate().getClientProperties() ); }
public void jsFunction_close() { getDelegate().closeWindow(); }
HTMLPage.Scriptable getDocumentScriptable() { return getScriptableObject().getDocument(); }
/** * initialize JavaScript for the given ScriptEngine * @parent - the Script Engine to use * @scriptable - the scriptable object to do the initialization for */ void initialize( JavaScriptEngine parent, ScriptableDelegate scriptable ) throws JavaScriptException, NotAFunctionException, PropertyException, SAXException { super.initialize( parent, scriptable ); _location = (Location) Context.getCurrentContext().newObject( this, "Location" ); _location.initialize(this, ((WebResponse.Scriptable) scriptable).getURL() ); _navigator = (Navigator) Context.getCurrentContext().newObject( this, "Navigator" ); _navigator.setClientProperties( getDelegate().getClientProperties() ); _screen = (Screen) Context.getCurrentContext().newObject( this, "Screen" ); _screen.setClientProperties( getDelegate().getClientProperties() ); }
public void jsFunction_close() { getDelegate().closeWindow(); }
public ScriptingHandler createJavascriptScriptingHandler() { return new Scriptable(); }
public boolean jsFunction_confirm( String message ) { return getDelegate().getConfirmationResponse( message ); }
public ScriptingHandler createJavascriptScriptingHandler() { return new Scriptable(); }
public void jsFunction_close() { getDelegate().closeWindow(); }
public boolean jsFunction_confirm( String message ) { return getDelegate().getConfirmationResponse( message ); }
HTMLPage.Scriptable getDocumentScriptable() { return getScriptableObject().getDocument(); }
public Scriptable jsGet_frames() throws SAXException, PropertyException, JavaScriptException, NotAFunctionException { if (_frames == null) { WebResponse.Scriptable scriptables[] = getDelegate().getFrames(); Window[] frames = new Window[ scriptables.length ]; for (int i = 0; i < frames.length; i++) { frames[ i ] = (Window) toScriptable( scriptables[ i ] ); } _frames = (ElementArray) Context.getCurrentContext().newObject( this, "ElementArray" ); _frames.initialize( frames ); } return _frames; }
public Document jsGet_document() { if (_document == null) { _document = (Document) toScriptable( getDelegate().getDocument() ); } return _document; }