public class DomWindow extends AbstractDomComponent implements org.mozilla.javascript.Scriptable
Constructor and Description |
---|
DomWindow(DomWindowProxy implementation) |
DomWindow(HTMLDocumentImpl document)
construct me from a document
|
Modifier and Type | Method and Description |
---|---|
void |
alert(String message)
Displays an alert box with the specified message.
|
void |
close()
Closes the current window.
|
boolean |
confirm(String prompt)
Displays a prompt, asking for a yes or no answer and returns the answer.
|
protected void |
discardDocumentWriteBuffer() |
void |
focus() |
org.w3c.dom.html.HTMLDocument |
getDocument() |
protected String |
getDocumentWriteBuffer() |
org.w3c.dom.html.HTMLDocument |
getOwnerDocument()
Returns the document associated with this window.
|
DomWindow |
getSelf() |
DomWindow |
getWindow() |
void |
moveTo(int x,
int y) |
DomWindow |
open(String urlString,
String name,
String features,
boolean replace)
Opens a named window.
|
String |
prompt(String message,
String defaultResponse)
Displays a promptand returns the user's textual reply, which could be the default reply.
|
void |
setProxy(DomWindowProxy proxy) |
void |
setTimeout(int timeout) |
clearCaches, createAnonymousFunctionName, get, getClassName, getJavaPropertyName, has, newScriptingEngine, put
clearErrorMessages, doEvent, doEventScript, evaluateExpression, getErrorMessages, handleEvent, handleScriptException, runScript, supportsScriptLanguage
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, hasInstance, hasProperty, hasProperty, isConst, isGetterOrSetter, isSealed, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
public DomWindow(HTMLDocumentImpl document)
document
- public DomWindow(DomWindowProxy implementation)
public void setProxy(DomWindowProxy proxy)
public DomWindow getWindow()
public DomWindow getSelf()
public org.w3c.dom.html.HTMLDocument getDocument()
public org.w3c.dom.html.HTMLDocument getOwnerDocument()
public DomWindow open(String urlString, String name, String features, boolean replace)
urlString
- the location (relative to the current page) from which to populate the window.name
- the name of the window.features
- special features for the window.replace
- if true, replaces the contents of an existing window.public void close()
public void alert(String message)
message
- the message to displaypublic boolean confirm(String prompt)
prompt
- the prompt text to displaypublic String prompt(String message, String defaultResponse)
message
- the prompt text to displaydefaultResponse
- the response to return if the user doesn't enter anythingpublic void setTimeout(int timeout)
public void focus()
public void moveTo(int x, int y)
protected String getDocumentWriteBuffer()
getDocumentWriteBuffer
in class ScriptingEngineImpl
protected void discardDocumentWriteBuffer()
discardDocumentWriteBuffer
in class ScriptingEngineImpl
Copyright © 2012. All Rights Reserved.